Re: Bash - Readline in nested whiles?

2009-03-08 Thread Olaf Reitmaier Veracierta
Olaf Reitmaier Veracierta wrote: Mike Bird wrote: On Sat March 7 2009 19:48:30 Olaf Reitmaier Veracierta wrote: cat list.txt a b while read r; do echo $r; done < list.txt; a b x=0; while read r; do while [ $x -lt 3 ]; do let x=$x+1; echo $r; done; done < lista.txt ; a a Why not the outp

Re: Bash - Readline in nested whiles?

2009-03-07 Thread Mike Bird
1) Please don't post HTML to the list. 2) Tell wget to retry (--tries=3) rather than using a loop. --Mike Bird -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Re: Bash - Readline in nested whiles?

2009-03-07 Thread Mike Bird
On Sat March 7 2009 19:48:30 Olaf Reitmaier Veracierta wrote: > cat list.txt > a > b > > while read r; do echo $r; done < list.txt; > a > b > > x=0; while read r; do while [ $x -lt 3 ]; do let x=$x+1; echo $r; done; > done < lista.txt ; > a > a > > Why not the output is? Can't be nested while whe

Bash - Readline in nested whiles?

2009-03-07 Thread Olaf Reitmaier Veracierta
cat list.txt a b while read r; do echo $r; done < list.txt; a b x=0; while read r; do while [ $x -lt 3 ]; do let x=$x+1; echo $r; done; done < lista.txt ; a a Why not the output is? Can't be nested while when reading line? a a a b b b Any comment will be preciated. --