I need to create a select menu with six options using the select loop and the case instruction BUT NOT THE ECHO COMMAND FOR THE MENU OPTION and they have to display like this:
1) opt1
2) opt2
3) opt3
4) opt4
5) opt5
6) opt6
And not like:
1) opt1 3) opt3 5) opt5
2) opt2 4) opt4 6) opt6
So far I have this code, but the problem is with the display, with 5 options it displays vertically, but with 6 it displays side by side:
#! /bin/sh
PS3="Enter your choice :"
select choice in "opt1" "opt2" "opt3" "opt4" "opt5" "Exit"; do
case $REPLY in
1) echo "$choice";;
2) echo "$choice";;
3) echo "$choice";;
4) echo "$choice";;
5) echo "$choice";;
6) echo "see you next time";break;;
*) echo "Wrong choice!";;
esac
done