Created
January 10, 2015 20:35
-
-
Save aholmes/3b6efde3cc3618a9814a to your computer and use it in GitHub Desktop.
Random number with MIN and MAX in Bash
This file contains hidden or 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 | |
MIN=$1 | |
MAX=$2 | |
NUM=$(( ( RANDOM % ( MAX - MIN + 1 ) + MIN ) )) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment