Skip to content

Instantly share code, notes, and snippets.

@devlato
Last active April 13, 2023 12:58
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 devlato/accd4b875253429184e39159e036bbe9 to your computer and use it in GitHub Desktop.
Save devlato/accd4b875253429184e39159e036bbe9 to your computer and use it in GitHub Desktop.
Chooses console for you
#!/usr/bin/env bash
chooseConsole() {
declare -a consoles=('PS4' 'PS4 Pro' 'Xbox One' 'XBox One S', 'Nintendo Switch', 'PS5', 'Xbox Series X')
local index=$(( $[$RANDOM % ${#consoles[@]}] ))
echo "${consoles[$index]}"
}
echo "You should get $(chooseConsole)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment