Skip to main content

Shell script generate random number

$RANDOM can be used for generating random number in bash. $RANDOM generate an integer value. For example if you want to generate number as minutes, the command just like:

# echo $[ RANDOM % 60 ]
34

Comments

Popular posts from this blog