Answers for "bash random number"

8

get random number shell script

$(( ( RANDOM % 10 )  + 1 ))
Posted by: Guest on March-23-2020
2

bash random number

$ echo $(( $RANDOM % 10 ))
Posted by: Guest on October-21-2020
2

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 
$RANDOM
Posted by: Guest on May-14-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language