PageRenderTime 20ms CodeModel.GetById 16ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 0ms

/contrib/dialog/samples/gauge2

https://bitbucket.org/freebsd/freebsd-head/
Shell | 28 lines | 18 code | 6 blank | 4 comment | 1 complexity | 8928c1b01e3cd5bda9e0d7de2512225d MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception, BSD-3-Clause, LGPL-2.0, LGPL-2.1, BSD-2-Clause, 0BSD, JSON, AGPL-1.0, GPL-2.0
 1#!/bin/sh
 2# $Id: gauge2,v 1.8 2010/01/13 10:26:52 tom Exp $
 3# The original dialog program assumed the first line after the first "XXX"
 4# was a percentage value (compare with "gauge" script).
 5
 6. ./setup-vars
 7
 8(echo "10" ; sleep 2 ; 
 9
10cat <<"EOF"
11XXX
12The new
13\n
14message
15XXX
1620
17EOF
18sleep 2; 
19
20echo "75" ; sleep 1
21echo "100") | \
22
23$DIALOG --title "GAUGE" "$@" --gauge "Hi, this is a gauge widget" 10 40 0
24
25if [ "$?" = $DIALOG_ESC ] ; then
26	echo ""
27	echo "Box closed !"
28fi