2 DIALOG
=${DIALOG=/usr/bin/dialog}
4 $DIALOG --title "CHECKLIST BOX" --clear \
5 --checklist "Hi, this is a checklist box. You can use this to \n\
6 present a list of choices which can be turned on or \n\
7 off. If there are more items than can fit on the \n\
8 screen, the list will be scrolled. You can use the \n\
9 UP/DOWN arrow keys, the first letter of the choice as a\n\
10 hot key, or the number keys 1-9 to choose an option. \n\
11 Press SPACE to toggle an option on/off. \n\n\
12 Which of the following are fruits?" -1 -1 5 \
13 "Apple" "It's an apple." off \
14 "Dog" "No, that's not my dog." ON \
15 "Orange" "Yeah, that's juicy." off \
16 "Cat" "No, never put a dog and a cat together!" oN \
17 "Fish" "Cats like fish." On \
18 "Lemon" "You know how it tastes." on
2> /tmp
/checklist.tmp.$$
22 choice
=`cat /tmp/checklist.tmp.$$`
23 rm -f /tmp
/checklist.tmp.$$
27 echo "'$choice' chosen.";;
29 echo "Cancel pressed.";;
31 [ -z "$choice" ] ||
echo $choice ;