why the code below, supposed to display a random from 2-3 range, actually works as if the range was 2-4?
I'm trying to get a random character print out in an array that is stored with characters. I'm new to bash and been looking at some guides along the way but have run into a bit of a problem.
I create an array to test with which stores chars.
I have been wondering what would be the best way to get good randomness in bash, i.e., what would be a procedure to get a random positive integer between MIN and MAX such that
The range can be arbitrarily large (or at least, say, up to 232-1);
Values are uniformly distributed (i.e., no bias);
It is efficient.
An efficient way to get randomness in bash is to use the $RANDOM variable.