xref: /freebsd/contrib/dialog/samples/gauge0-input-fd (revision e0c4386e7e71d93b0edc0c8fa156263fc4a8b0b6)
1#!/bin/sh
2# $Id: gauge0-input-fd,v 1.5 2010/01/13 10:20:03 tom Exp $
3# modified "gauge0" script to use "--input-fd" option.
4
5. ./setup-vars
6
7exec 3<&0
8PCT=10
9(
10sleep 1
11while test $PCT != 110
12do
13cat <<EOF
14XXX
15$PCT
16The new\n\
17message ($PCT percent)
18XXX
19EOF
20PCT=`expr $PCT + 10`
21sleep 1
22done
23) |
24
25$DIALOG --title "GAUGE" --input-fd 3 "$@" --gauge "Hi, this is a gauge widget" 0 0 0
26
27exec 3<&-
28