Date: Tue, 9 Jul 2002 23:44:44 +0200 From: David =?iso-8859-1?Q?Sieb=F6rger?= <drs@rucus.ru.ac.za> To: Lee J Carmichael <lcarmich@wamnet.com> Cc: David Smithson <david@customfilmeffects.com>, FreeBSD-Questions <freebsd-questions@FreeBSD.ORG> Subject: Re: How do I repeat a command N times? Message-ID: <20020709214444.GA22193@rucus.ru.ac.za> In-Reply-To: <Pine.SGI.3.96.1020709115845.295966F-100000@y.dev.wamnet.com> References: <004201c22769$8468df70$0801a8c0@customfilmeffects.com> <Pine.SGI.3.96.1020709115845.295966F-100000@y.dev.wamnet.com>
index | next in thread | previous in thread | raw e-mail
On Tue 2002-07-09 (12:04), Lee J Carmichael wrote:
> The 'for' loops in bash, ksh, sh don't do the c-style for processing,
> these are more perl like loops (iterate through a list of thingys like (a
> b c).
>
> BTW, the loop below needs to be changed slightly for bash, here is the
> bash version:
>
> let x=0
> let stop=607
>
> while [ $x -le $stop ]
> do
> echo $x
> let x=$x+1
> done
bash has a for loop:
for (( x=0 ; x<=607 ; x++ )) ; do
echo $x
done
There's no need to involve Perl in a simple problem like this.
--
David Siebörger
drs@rucus.ru.ac.za
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020709214444.GA22193>
