If I try to run this script:
clear
echo -n "please enter a value"
read num
if [ "$num" -eq 8 ] then
echo "you entered 8"
else
echo "the number you entered was not 8"
I get the following output/error:
please enter a value5
./script.sh: line 9: syntax error near unexpected token `else'
./script.sh: line 9: else'
Why wont this script run?