GNU Bash 5.1 Released With New "SRANDOM" Variable As A New Means Of Randomness
GNU Bash 5.1 was released on Monday as the newest feature release to this popular POSIX shell implementation with many extra features.
Beyond the usual bug fixing, Readline updates, and other mostly mundane changes, one interesting addition to note with Bash 5.1 is the new SRANDOM variable. The SRANDOM variable provides random data from the system's entropy engine and cannot be reseeded. In particular, the SRANDOM variable provides a 32-bit random number that relies upon getrandom/getentropy -- with fall-backs to /dev/urandom or arc4random or even another fallback after that if necessary.
New loadable built-ins with Bash 5.1 include mktemp, accept, mkfifo, csv, and cut/lcut. Bash 5.1 also allows SIGINT trap handlers to execute recursively.
For more details on the other changes to GNU Bash 5.1, see the release announcement.
Beyond the usual bug fixing, Readline updates, and other mostly mundane changes, one interesting addition to note with Bash 5.1 is the new SRANDOM variable. The SRANDOM variable provides random data from the system's entropy engine and cannot be reseeded. In particular, the SRANDOM variable provides a 32-bit random number that relies upon getrandom/getentropy -- with fall-backs to /dev/urandom or arc4random or even another fallback after that if necessary.
New loadable built-ins with Bash 5.1 include mktemp, accept, mkfifo, csv, and cut/lcut. Bash 5.1 also allows SIGINT trap handlers to execute recursively.
For more details on the other changes to GNU Bash 5.1, see the release announcement.
22 Comments