Re: bash problem

2005-03-02 Thread zavandi
Conway S. Smith <[EMAIL PROTECTED]> wrote: > [...] > So, that means either I'm wrong and it's not something to do with the > for loop being executed in a subshell, or else the bash script sets up > the subshell's environment so that RANDOM works correctly. It could very well be about the for loop

bash problem

2005-03-01 Thread zavandi
I found some strange result. Here it is in its most simplified form I can think of. This command usually prints a few OKs, as expected: for ((i=0; i< 10; i++)); do if [ $RANDOM -eq 0 ]; then echo OK; fi; done But this other command _never_ prints anything: for ((i=0; i< 10; i++)); do if