Re: xen, bash, and random seed failure
- From: mop2 <invalid@xxxxxxxxxxxx>
- Date: Sun, 31 Jan 2010 15:47:18 -0200
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?
.
- Follow-Ups:
- Re: xen, bash, and random seed failure
- From: Jon LaBadie
- Re: xen, bash, and random seed failure
- References:
- xen, bash, and random seed failure
- From: Brendan
- Re: xen, bash, and random seed failure
- From: mop2
- Re: xen, bash, and random seed failure
- From: Jon LaBadie
- xen, bash, and random seed failure
- Prev by Date: Re: prevent echo to pipe going to stdout
- Next by Date: Re: xen, bash, and random seed failure
- Previous by thread: Re: xen, bash, and random seed failure
- Next by thread: Re: xen, bash, and random seed failure
- Index(es):
Relevant Pages
|