Date: Wed, 18 Jul 2001 11:16:36 +0100 From: Paul Branston <apbran@rannoch.demon.co.uk> To: teo@gecadsoftware.com Cc: freebsd-questions@freebsd.org Subject: Re: sh for loop Message-ID: <20010718111636.A253@rannoch.demon.co.uk> In-Reply-To: <20010718125704.B909@gecadsoftware.com>; from teo@gecadsoftware.com on Wed, Jul 18, 2001 at 12:57:04PM %2B0300 References: <20010717214314.A2960@drex.staff.izr.com> <20010718125704.B909@gecadsoftware.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jul 18, 2001 at 12:57:04PM +0300, teo@gecadsoftware.com wrote: > Hi Mark! > On Tue, 17 Jul 2001, Mark Drayton wrote: > > > Hi > > > > As part of a shell script I need to write a for loop that iterates from > > 1 to 10 inclusive. I know I can use this: > > > > for i in 1 2 3 4 5 6 7 8 9 10; do > > echo $i > > done > [bash magik] > for((i=1;i<11;++i)); do > echo $i; > done also works in zsh but not in ksh (not this version anyway); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010718111636.A253>