mirror of
https://github.com/masonr/yet-another-bench-script.git
synced 2025-11-09 16:40:07 +05:30
refactor: make AWK required for this script to run
This commit is contained in:
parent
7dd8050c03
commit
0aa21fff5e
1 changed files with 11 additions and 1 deletions
12
yabs.sh
12
yabs.sh
|
|
@ -26,7 +26,7 @@ function check_command() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check for required commands and add warnings if not available
|
# Check for required commands and add warnings if not available
|
||||||
REQUIRED_COMMANDS=("locale" "uname" "getconf" "awk" "sed" "grep" "cut" "shuf" "timeout" "date" "trap" "df" "free" "systemd-detect-virt")
|
REQUIRED_COMMANDS=("locale" "uname" "getconf" "sed" "grep" "cut" "shuf" "timeout" "date" "trap" "df" "free" "systemd-detect-virt")
|
||||||
|
|
||||||
echo -e "\nChecking available commands"
|
echo -e "\nChecking available commands"
|
||||||
echo -e "---------------------------------"
|
echo -e "---------------------------------"
|
||||||
|
|
@ -52,6 +52,16 @@ else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check for AWK
|
||||||
|
if check_command "awk"; then
|
||||||
|
echo -e "awk : \xE2\x9C\x94 installed"
|
||||||
|
else
|
||||||
|
echo -e "awk : \xE2\x9D\x8C not installed"
|
||||||
|
echo -e "\nError: 'awk' command found. Please install one of those to continue, script heavily relies on it."
|
||||||
|
echo -e
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo -e
|
echo -e
|
||||||
if check_command "date"; then
|
if check_command "date"; then
|
||||||
date
|
date
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue