PageRenderTime 11ms CodeModel.GetById 8ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/contrib/dialog/samples/gauge0-input-fd

https://bitbucket.org/freebsd/freebsd-head/
Shell | 27 lines | 20 code | 4 blank | 3 comment | 2 complexity | 05e45e307b7d994bd70a8fccaebdc12c MD5 | raw file
 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<&-