[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: simple bash loop problem ...



How about 
for N in `seq 1 9`
  do...?

--Todd

On Sun, 29 Jun 2003 09:55:00 +0000
Jonathan Matthews <jaycee.removeifnotspam@jaycee.uklinux.net> wrote:

> On Sat, Jun 28, 2003 at 03:03:27PM +0100, David selby wrote:
> > Hello,
> > 
> > I am writing bash a bash & sed script, it has been going suprisingly
> > 
> > well. I need a loop to count 9 times & the variable n to the count
> > ..
> [snip]
> 
> for N in 1 2 3 4 5 6 7 8 9
> do
>  echo $N
> done
> 
> I'm sure someone will point out a more elegant first line than this.
> 
> HTH,
>   jc



Reply to: