xref: /freebsd/contrib/dialog/samples/report-string (revision bb15ca603fa442c72dde3f3cb8b46db6970e3950)
1# $Id: report-string,v 1.2 2010/01/13 10:00:11 tom Exp $
2# Report result passed in a string $RESULT
3# vile:shmode
4
5case $retval in
6  $DIALOG_OK)
7    echo "Result is $RESULT";;
8  $DIALOG_CANCEL)
9    echo "Cancel pressed.";;
10  $DIALOG_HELP)
11    echo "Help pressed ($RESULT).";;
12  $DIALOG_EXTRA)
13    echo "Extra button pressed.";;
14  $DIALOG_ITEM_HELP)
15    echo "Item-help button pressed.";;
16  $DIALOG_ESC)
17    if test -n "$RESULT" ; then
18      echo "$RESULT"
19    else
20      echo "ESC pressed."
21    fi
22    ;;
23esac
24