Friday, June 24, 2016

Print a random integer in the bash console

If you need a random positive integer, you can print the variable $RANDOM. For example:

mycomputer ~% echo $RANDOM
120865

No comments:

Post a Comment