Re: xen, bash, and random seed failure



On Sun, 31 Jan 2010 15:38:33 -0200, Jon LaBadie <jlabadie@xxxxxxxxx> wrote:

mop2 wrote:
On Sun, 31 Jan 2010 14:33:32 -0200, Brendan <brendandetracey@xxxxxxxxx>
wrote:

Hello,

An oft-repeated means for seeding bash $RANDOM is:
RANDOM=$$$(date +%s)

However on Linux 2.6.18-xen #1 SMP Fri May 18 16:11:33 BST 2007 i686
GNU/Linux thise method is not working for me:
RANDOM=$$$(date +%s)
echo $RANDOM

I keep getting a value of 15929. Why is the seed value invalid? 32-bit
OS?

Thanks



RANDOM is a special var.

Try:
unset RANDOM
RANDOM=$(date +%s)

You should have tried it yourself.

unsetting RANDOM takes away its "specialness".

Is not this exactly what the OP wants?
.



Relevant Pages

  • Re: xen, bash, and random seed failure
    ... mop2 wrote: ... An oft-repeated means for seeding bash $RANDOM is: ... GNU/Linux thise method is not working for me: ... echo $RANDOM ...
    (comp.unix.shell)
  • Re: xen, bash, and random seed failure
    ... Brendan wrote: ... An oft-repeated means for seeding bash $RANDOM is: ... GNU/Linux thise method is not working for me: ... echo $RANDOM ...
    (comp.unix.shell)
  • Re: xen, bash, and random seed failure
    ... mop2 wrote: ... An oft-repeated means for seeding bash $RANDOM is: ... GNU/Linux thise method is not working for me: ... echo $RANDOM ...
    (comp.unix.shell)
  • Re: xen, bash, and random seed failure
    ... An oft-repeated means for seeding bash $RANDOM is: ... GNU/Linux thise method is not working for me: ... echo $RANDOM ... unset RANDOM ...
    (comp.unix.shell)