On 2-1-2019 02:29, Ole Tange wrote:
On Mon, Dec 31, 2018 at 8:12 PM Chet Ramey <chet.ra...@case.edu> wrote:
:
Thanks for the patch. I'll take a look after I release bash-5.0. One
question: can you reproduce the same random sequence by using the same
seed? That's for backwards compatibility, even if the sequences themselves
differ.

Yes. Seeding with a value will give the same sequence:

$ RANDOM=4; echo $RANDOM $RANDOM
21584 22135

$ RANDOM=4; echo $RANDOM $RANDOM
21584 22135


But not across systems:
luuk@WINDOWS:/mnt/c/Windows/System32$ RANDOM=4;echo $RANDOM $RANDOM
1692 27588
luuk@WINDOWS:/mnt/c/Windows/System32$ RANDOM=4;echo $RANDOM $RANDOM
1692 27588

luuk@opensuse:~> RANDOM=4; echo $RANDOM $RANDOM
32221 21043
luuk@opensuse:~> RANDOM=4; echo $RANDOM $RANDOM
32221 21043

Reply via email to