I've developed a habit of just writing
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
do
... blah blah blah ...
done
It's not as elegant as Bob's solution, but it's a "portable" idiom in
that it works for shells (like Bourne and C shell) that don't have
built-in incrementing loop constructs.
Another alternative is to write yourself a "count" script in Perl
so that you can
for i in `count 1 20`
do
... blah blah blah ...
done
The Perl is trivial:
for ($i = $ARGV[0]; $i <= $ARGV[1]; $i++) { print "$i\n"; }
I've got a slightly more elegant version sitting around if anybody
wants it.
--
Hal Pomeranz, Founder/CEO Deer Run Associates [EMAIL PROTECTED]
Network Connectivity and Security, Systems Management, Training
_______________________________________________
EuG-LUG mailing list
[EMAIL PROTECTED]
http://mailman.efn.org/cgi-bin/listinfo/eug-lug