5
rated 0 times
[
5]
[
0]
/ answers: 1 / hits: 6996
/ 2 Years ago, wed, september 14, 2022, 5:34:59
I want to create more menus under option "a" when selected. If the user entered option "a" I want it to have a couple menus for you to select and for one of the options is to return to the "Main Menu". This is the 2 problems I'm having trouble with. I tried doing this same format I have below for the menu here and put it under "A" block of code but that didn't work.
#!/bin/bash
ok=0;
while ((ok==0))
do
echo "Main Menu:"
echo -e " (a) More Menu Options "
echo -e " (b) Exit"
echo -n "Please enter your choice:"
read choice
case $choice in
"a"|"A")
ok=1
;;
"b"|"B")
exit
;;
*)
echo "invalid answer, please try again"
;;
esac
done
More From » bash