Created
September 2, 2016 19:42
-
-
Save lukassup/aec9d2e5ad7533d730f143eed5e4f5ee to your computer and use it in GitHub Desktop.
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 | |
| random_choice() { | |
| choices=("$@") | |
| echo ${choices[$(( $RANDOM % ${#choices[@]} ))]} | |
| } | |
| random_choice "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment