Bash junk

Jack Detrick vze24938 at verizon.net
Sun Jan 14 19:52:58 PST 2001


Try:
for in in `seq 1 10`

Although that may not be what you want...


Andy Goth wrote:
> 
> On Sunday, January 14, 2001 21:24, Simon Perreault wrote:
> > Oops, it should end with a 1, not a 0. I modified the script and
> > forgot to modify the output. Read like this:
> >
> > hi
> > 0
> > 1
> > 0
> > 0
> > 1
> 
> Mmm, I was looking at that output and scratching my balding seventeen-year-old head.  Thanks for clarifying.
> 
> [andy at chainsaw|~]$ false; echo m00; for i in 4; do echo ${?}; done
> m00
> 0
> [andy at chainsaw|~]$ false; for i in 4; do echo ${?}; done
> 1
> 
> Yeah, that confirms it.
> 
> Speaking of for, how can I go through a range of numbers?  Is it possible??  Y'know, like "for (int i = 0; i < 10; i++)" for i to go from 0 - 9.  Up until now I've been forced to do some weird while stuff incrementing with the clumsy "i=$[${i} + 1]".
> 
> --
> Andy Goth  |  unununium at openverse.org  |  uin: 35256413  |  aim: Un111
> 
> --
> Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
> and put unsubscribe in the subject header of the message

-- 
With no walls or fences on the internet, who needs Windows or Gates?

-- 
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message




More information about the lfs-dev mailing list