Skip to content

Instantly share code, notes, and snippets.

@stoyanovgeorge
Last active August 20, 2018 10:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stoyanovgeorge/aaf8f49b680203d321442a38a266e13b to your computer and use it in GitHub Desktop.
Save stoyanovgeorge/aaf8f49b680203d321442a38a266e13b to your computer and use it in GitHub Desktop.
Bash script which generates random number in a range [0 : 500]
#!/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