]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/dialog/samples/gauge0-input-fd
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / dialog / samples / gauge0-input-fd
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
7 exec 3<&0
8 PCT=10
9 (
10 sleep 1
11 while test $PCT != 110
12 do
13 cat <<EOF
14 XXX
15 $PCT
16 The new\n\
17 message ($PCT percent)
18 XXX
19 EOF
20 PCT=`expr $PCT + 10`
21 sleep 1
22 done
23 ) |
24
25 $DIALOG --title "GAUGE" --input-fd 3 "$@" --gauge "Hi, this is a gauge widget" 0 0 0
26
27 exec 3<&-