MOON
Server: Apache/2.2.23 (Unix) mod_ssl/2.2.23 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 PHP/5.4.10
System: Linux vps.presagepowered.net 2.6.18-398.el5 #1 SMP Tue Sep 16 20:51:48 EDT 2014 i686
User: mckernan (512)
PHP: 5.4.10
Disabled: NONE
Upload Files
File: //usr/share/doc/dialog-1.0.20051107/samples/checklist9
#! /bin/sh
# $Id: checklist9,v 1.1 2004/03/13 19:25:43 tom Exp $
# "checklist8" using --file
: ${DIALOG=dialog}

tempfile=`tempfile 2>/dev/null` || tempfile=/tmp/test$$
trap "rm -f $tempfile" 0 1 2 5 15

$DIALOG --file checklist9.txt 2>$tempfile

retval=$?

choice=`cat $tempfile`
case $retval in
  0|2)
    echo "'$choice' chosen.";;
  1)
    echo "Cancel pressed.";;
  255)
    echo "ESC pressed.";;
  *)
    echo "Unexpected code $retval";;
esac