I am making a tool script for my theme with 2 functions: Check for update, reinstall theme
So here is the code for selection menu:
PS3='Choose an option: '
options=("Check for update" "Reinstall theme")
select opt in "${options[@]}"
do
case $opt in
"Check for update")
echo "Checking update"
;;
"Reinstall theme")
echo "Reinstalling"
;;
*) echo invalid option;;
esac
done
When running it appear like this
1) Check for update
2) Reinstall theme
Choose an option:
I type 1 and enter, the check for update command is performed
The problem is when it finished performing the script, it re-display "Choose an option:" not with the menu. So it can make users hard to choose without the menu (especially after a long script)
1) Check for update
2) Reinstall theme
Choose an option: 1
Checking update
Choose an option:
So how can I re-display the menu after an option is performed