|
Re: Script and If Statement
Spose there's an easier way but I haven't found it (74 chars):
if [ "$ans" = "y" ] || [ "$ans" = "Y" ]; then echo "ok"; else echo "you made a boo boo"; fi
You could also use a simple case statement (72 chars):
case "$ans" in
y|Y)
echo "ok";;
*)
echo "you made a boo boo"
exit 1;;
esac
Last edited by unSpawn; 04-12-2002 at 06:38 PM.
|