Bash Scripting - Conditionals
Find the error in this script:
#!/bin/bash if [ $num -eq 5 ]then echo "Number is 5" fi
#!/bin/bash if [ $num -eq 5 ]then echo "Number is 5" fi
then if on the same line or a newline before then. Here, then immediately follows ] without ; or newline, causing syntax error.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions