Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 6e125fffce41d55d01eca1f56b99ee15 > files > 75

Xdialog-2.0.4-2mdk.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/bashrc | 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.$$