I have the following script that works fine:
!/bin/bash a=12 while [ $a -gt 10 ] do echo "$a" a=$(($a-1)) done echo "done"
If I add line "echo something" above "do", I expect to see a syntax error in that line. It seems that
[ $a -gt 10 ] is bypassed, and it becomes an infininte loop. How could that happen?