Categories
linux

Bash random number generation

Historically I’ve used $RANDOM as a random number source in bash — a bit like : RAND=$(( $RANDOM % 10 )) when I’ve needed a random number out of 0,1,2,3,4,5,6,7,8 and 9 one problem with this is that $RANDOM itself is populated between 0 and 32767 by the shell – so it’s not going to […]