2 DIALOG=${DIALOG=/usr/bin/dialog}
4 $DIALOG --clear --title "MENU BOX" \
5 --hline "Press 1-9, Up/Down, first letter or Enter" \
6 --menu "Hi, this is a menu box. You can use this to \n\
7 present a list of choices for the user to \n\
8 choose. If there are more items than can fit \n\
9 on the screen, the menu will be scrolled. \n\
10 You can use the UP/DOWN arrow keys, the first \n\
11 letter of the choice as a hot key, or the \n\
12 number keys 1-9 to choose an option.\n\
14 Choose the OS you like:" -1 -1 4 \
15 "FreeBSD" "A Real Operating System for Real Users" \
16 "Linux" "Another free Unix Clone for 386/486" \
18 "WIN NT" "Microsoft Windows NT" \
19 "PCDOS" "IBM PC DOS" \
20 "MSDOS" "Microsoft DOS" 2> /tmp/menu.tmp.$$
24 choice=`cat /tmp/menu.tmp.$$`
25 rm -f /tmp/menu.tmp.$$
29 echo "'$choice' chosen.";;
31 echo "Cancel pressed.";;
33 [ -z "$choice" ] || echo $choice ;