אוויר לנשימה
New member
bash menu - help
Hi Guys,
I'm using the following menu format:
select opt in "${options[@]}"
do case $opt in "List") cat file.txt ;; "Joined") run script ;; "Opened") run other script ;; "Number") one more script ;; "Quit") exit ;; *) echo "invalid option";; esac done
When the user selsct one of the option a script is runing, all is good.
but when the script ends I get this line:
"Select your choise or press the Enter to go back to menu:"
What I would like to do is that after the script rans to go back to menu.where I would like to see all menu option again.
Thanks!
Air
Hi Guys,
I'm using the following menu format:
PS3='Select your choise or press the Enter to go back to menu:'
options=("list" "Joined" "Opened" "Number" "Quit")select opt in "${options[@]}"
do case $opt in "List") cat file.txt ;; "Joined") run script ;; "Opened") run other script ;; "Number") one more script ;; "Quit") exit ;; *) echo "invalid option";; esac done
When the user selsct one of the option a script is runing, all is good.
but when the script ends I get this line:
"Select your choise or press the Enter to go back to menu:"
What I would like to do is that after the script rans to go back to menu.where I would like to see all menu option again.
Thanks!
Air