Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 471ab38d6fdc66625fe35554f09fbbe3 > files > 117

Xdialog-2.3.1-6.mga5.i586.rpm

#!/bin/sh
DIALOG=Xdialog

cat << EOF > /tmp/textbox.tmp.$$
Hi, this is a text dialog box. It can be used to display text from a file.

It's like a simple text file viewer, with these keys implemented:

PGDN	- Move down one page
PGUP	- Move up one page
DOWN	- Move down one line
UP	- Move up one line

The following is a sample text file:


EOF

cat /etc/services | expand >> /tmp/textbox.tmp.$$

$DIALOG --title "TEXT BOX" --textbox "/tmp/textbox.tmp.$$" 0 0

case $? in
  0)
    echo "OK";;
  1)
    echo "Cancel pressed.";;
  255)
    echo "Box closed.";;
esac

rm -f /tmp/textbox.tmp.$$