select word in $menulist #change_title remove_tag change_tag add_line quit
do
case $word in
\# first menu option Change Title
Change_title\)
.....
after choosing the first time and running the script, the menu option will not reappear, the script will only prompt #? instead of the whole menu list.
while [ 1 ]
do
select word in $menulist #change_title remove_tag change_tag add_line quit
do
if [ "$word" = "" ]
then
exit
fi
case $word in
# first menu option Change Title
Change_title)
.....
done
PS3='Choose your word: '
while [ 1 ]
do
select word in "change_title" "remove_tag" "change_tag" "add_line" "quit"
do
if [ "$word" = "" ]
then
exit
fi
echo $word
break
done
done
this works for the first 4 menu options, the menu will reappear.
However, I also have a fifth menu option Quit which is supposed to end the program, but now even if I choose option quit it will still jump back to the menu selection. I do not want to use Ctrl-c to quit the program