Last active
August 20, 2018 10:46
-
-
Save stoyanovgeorge/aaf8f49b680203d321442a38a266e13b to your computer and use it in GitHub Desktop.
Bash script which generates random number in a range [0 : 500]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
range=500 | |
number=$RANDOM | |
let "number %= $range" | |
printf "Random number less than %s - %s\n" "$range" "$number" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment