Shell/Bash: bash random number Example


Shell/Bash Example: This is the "bash random number" Example. compiled from many sources on the internet by

get random number shell script

$(( ( RANDOM % 10 )  + 1 ))

bash random number

$ echo $(( $RANDOM % 10 ))

bash generate random number between

#If you have coreutils installed and want a number inbewtween a value
shuf -i MIN-MAX -n 1
#or you can use bash 

* Summary: This "bash random number" Shell/Bash Example is compiled from the internet. If you have any questions, please leave a comment. Thank you!