I experimentally ran if bat1 == 1 then echo yes fi
and am stuck in a single-angle-bracket-prompt purgatory in which Ctrl + c or z fails to open the door. Any suggestions?
1 Answer
ctrl+d should do the trick
You should write something more like:
[ $bat1 -eq 1 ] && echo yes
or
if [ $bat1 -eq 1 ]; then echo yes ; fi