Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release > by-pkgid > 9a26ee7abed05cda7d0d61634b345519 > files > 105

Xdialog-2.3.1-6.mga5.x86_64.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.$$