Re:Random Numbers in Bash
by nixcraft on Monday March 27, 2023 @11:03AM
(#35327615)
Are you on GNU/Bash version 5.1[0]? A new bash variable, SRANDOM added to GNU/Bash-5.1 release, which gets its random data from the system’s entropy engine and is not lined and cannot be reseeded to get an identical random sequence. For example:
[0] https://www.cyberciti.biz/linux-news/gnu-bash-5-1-released-w...
[ Parent
| on HN ]
Or something like this; echo -e "$SRANDOM"{1..5}"\n"
Er, I don't think you want that.