Re: $RANDOM is never equal to the next $RANDOM

2005-03-07 Thread zavandi
Chet Ramey <[EMAIL PROTECTED]> wrote: > Mathematically that's correct, but since having $RANDOM return the same > value twice in a row would greatly diminish its practical use, there is > special code in there to prevent it. OK, then. I'm not an expert bash programmer, so probably you're right.

Re: $RANDOM is never equal to the next $RANDOM

2005-03-07 Thread zavandi
Chet Ramey <[EMAIL PROTECTED]> wrote: > Why would you expect $RANDOM to return the same value twice in succession? I don't expect it to always return the same value twice in succession, but if the values are independent of one another, there is a 1/32768 probability the second value will be equal

$RANDOM is never equal to the next $RANDOM

2005-03-07 Thread zavandi
Configuration Information [Automatically generated, do not change]: Machine: i386 OS: linux-gnu Compiler: i386-redhat-linux-gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/sha

Re: $RANDOM never returns 0 in some conditions

2005-03-05 Thread zavandi
ANDOM 16838 $ cat bla.sh #!/bin/bash RANDOM=1; echo $RANDOM $ ./bla.sh 16838 $ (./bla.sh) 16838 Ctrl+D (in another terminal) $ RANDOM=1; echo $RANDOM 16838 Is anyone looking into this? On Wed, 2 Mar 2005 14:15:41 +0200, zavandi <[EMAIL PROTECTED]> wrote: > Configuration Information

$RANDOM never returns 0 in some conditions

2005-03-02 Thread zavandi
Configuration Information [Automatically generated, do not change]: Machine: i386 OS: linux-gnu Compiler: i386-redhat-linux-gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/sha