Bash Scripting - Conditionals
Identify the problem in this script:
#!/bin/bash if [ $num -gt 10 ]; then echo "Big" else echo "Small" fi
#!/bin/bash if [ $num -gt 10 ]; then echo "Big" else echo "Small" fi
$num is unquoted. If empty, test fails with error.then and fi are present and operator -gt is correct.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions