if...then....else?
Not sure why this won't work, any thoughts?
echo enter the letter A or the letter B read letter if["$letter" = "A"]; then echo "coolit's an A" elif["$letter" = "B"]; then echo "not cool it's a B" else echo "You MESSED UP!" fi |
"Won't work is broad", how doesn't it work?
There must be a space between 'if' and '[' Comparison might work with '=', yet it is clearer to use '==' Run your script with 'sh -x <scriptname> jlinkels |
All times are GMT -5. The time now is 03:20 PM. |