How to generate random numbers in shell?
Generating random numbers in shell can be done by utilizing the Bash $RANDOM function. This function will return a random integer between 0 and 32767 (inclusive). To make use of it, the syntax is: $RANDOM The random number returned can be used directly as it is, or stored in a variable as such: VAR=$RANDOM To …
