Bash junk

Andy Goth andy at chainsaw.grimnok.com
Sun Jan 14 19:35:46 PST 2001


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




More information about the lfs-dev mailing list