2 DIALOG=${DIALOG=/usr/bin/dialog}
4 cat << EOF > /tmp/textbox.tmp.$$
5 Hi, this is a text dialog box. It can be used to display text from a file.
6 The file should not contain any 'tab' characters, so you should 'expand'
7 the file first if it contains 'tab' characters.
9 It's like a simple text file viewer, with these keys implemented:
11 PGDN/SPACE - Move down one page
12 PGUP/'b' - Move up one page
13 DOWN/'j' - Move down one line
14 UP/'k' - Move up one line
15 LEFT/'h' - Scroll left
16 RIGHT/'l' - Scroll right
17 '0' - Move to beginning of line
18 HOME/'g' - Move to beginning of file
19 END/'G' - Move to end of file
22 'n' - Repeat last search (forward)
23 'N' - Repeat last search (backward)
26 The following is a sample text file:
31 cat ../COPYING | expand >> /tmp/textbox.tmp.$$
33 $DIALOG --clear --title "TEXT BOX" --textbox "/tmp/textbox.tmp.$$" 22 77
39 echo "EXIT choosed.";;
42 rm -f /tmp/textbox.tmp.$$