3

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?

5

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
1
  • Ah yes. Thought I'd checked that. cheers :) – geotheory Dec 3 '15 at 14:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.