]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/dialog/samples/report-tempfile
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / dialog / samples / report-tempfile
1 # $Id: report-tempfile,v 1.3 2010/01/13 09:59:05 tom Exp $
2 # Report results in a temporary-file.
3 # vile:shmode
4
5 case $retval in
6   $DIALOG_OK)
7     echo "Result: `cat $tempfile`";;
8   $DIALOG_CANCEL)
9     echo "Cancel pressed.";;
10   $DIALOG_HELP)
11     echo "Help pressed.";;
12   $DIALOG_EXTRA)
13     echo "Extra button pressed.";;
14   $DIALOG_ITEM_HELP)
15     echo "Item-help button pressed.";;
16   $DIALOG_ESC)
17     if test -s $tempfile ; then
18       cat $tempfile
19     else
20       echo "ESC pressed."
21     fi
22     ;;
23 esac