I created a simple selection menu in Bash. It currently displays the menu horizontally (with tabs):
1) Create a VM from scratch 3) Command-line Usage 2) Management Menu 4) Quit
I would like the list to look like this:
1) Create a VM from scratch 2) Management Menu 3) Command-line Usage 4) Quit
UPDATE : here is my code:
PS3="Please choose a valid option : " OPTIONS=("Create a VM from scratch" "Management Menu" "Command-line Usage" "Quit") select opt in "${OPTIONS[@]}"; do case $opt in "Create a VM from scratch") createit exit ;; "Management Menu") mgmtmenu exit ;; "Command-line Usage ") help ;; "Quit") exit ;; *) echo invalid option;; esac done
How can I display a selection menu with each option on its own line?
source share