[darcs-devel] rollback.sh
Ferenc Wagner
wferi at niif.hu
Tue Mar 18 09:41:38 UTC 2008
"David Roundy" <daveroundy at gmail.com> writes:
> On Mon, Mar 17, 2008 at 5:42 PM, Guillaume Outters
> <guillaume.outters at free.fr> wrote:
>> > Now that we're using bash, we could do a for loop?
>
> Any idea how to do that? I always use seq to implement for loops in
> bash. Of course, we could always use the ultra-lame option of writing
>
> for i in "1 2 3 4 ... 500"; do
>
> but that just makes me cringe.
Why not use the standard while loop definition of for?
i=0
while [ $i -lt 500 ]; do
i=$(($i+1))
<for body>
done
--
Regards,
Feri.
More information about the darcs-devel
mailing list