there is also:
selection={"selection msg" selection1 selection2 selection3 selection4 ... selectionN}
sellen=6
# if you want to get fancy, use tput to position your menu
tput init
tput 20 20
while [ 1 ]; do
# this is to leave a line above the selection msg for clarity:
echo
# selection[0] is the message for the selection:
echo ${selection[0]}
# selections start at 1
let i=1
while [ $i -lt sellen ]; do
# here you can format your selections as you like
# either [$i] or ($i) or $i- etc...
echo [$i] ${selection[$i]}
let i=$i+1
done
# here read in only one character using the -s option of read
read -s 1 k
# key entry handler:
case $k in
1|2|3|4|5|6)
# if selection is a msg:
echo ${selection[$k]}
# if selection is a command or function name simply call it:
${selection[$k]}
break
;;
*)
# if you want a clear screen do so here:
clear
# and if you want to re position the menu
tput 20 20
;;
esac
done
# try keying in something other than 1,2,3,4,5,6
# the message will reappear in the manner it was formatted
# personally i prefer this method than using select
cheers
sp