]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/dialog/samples/shortlist
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / dialog / samples / shortlist
1 #!/bin/sh
2 # $Id: shortlist,v 1.2 2011/03/02 00:11:50 tom Exp $
3 # make a short listing, which writes to both stdout and stderr.
4
5 if test $# != 0
6 then
7         count=$1
8 else
9         count=10
10 fi
11
12 while test $count != 0
13 do
14         echo "** $count -- `date`"
15         w >&2
16         sleep 1
17         count=`expr $count - 1 2>/dev/null`
18         test -z "$count" && count=0
19 done