KrazyPenguin
June 24th, 2007, 11:45 PM
Yes the while loop worked:
set -- option1 option2 option3
while [ 1 ]; do
select opt; do
if[ "$opt" = option1]; then
echo "do these commands"
elif [ "$opt" = option2]; then
echo "do these commands instead"
elif [ "$opt' = option3] then
echo "bye!!!"
exit
else
clear
echo "Wrong Option"
[COMMAND TO REDISPLAY MENU???]
break
fi
done
done
So I needed to use "break" to break the first loop and set up a "while" loop to display the menu again.
Easy now that I think about it. New to scripting.
Thanks,
;-)
set -- option1 option2 option3
while [ 1 ]; do
select opt; do
if[ "$opt" = option1]; then
echo "do these commands"
elif [ "$opt" = option2]; then
echo "do these commands instead"
elif [ "$opt' = option3] then
echo "bye!!!"
exit
else
clear
echo "Wrong Option"
[COMMAND TO REDISPLAY MENU???]
break
fi
done
done
So I needed to use "break" to break the first loop and set up a "while" loop to display the menu again.
Easy now that I think about it. New to scripting.
Thanks,
;-)