PageRenderTime 3ms CodeModel.GetById 1ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/contrib/dialog/samples/report-tempfile

https://bitbucket.org/freebsd/freebsd-head/
#! | 23 lines | 22 code | 1 blank | 0 comment | 0 complexity | aa372ac86d0a421378cf57432276a517 MD5 | raw file
 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
 5case $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    ;;
23esac