Skip to content

Instantly share code, notes, and snippets.

@dannyamey
Created September 8, 2011 15:51
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 dannyamey/1203739 to your computer and use it in GitHub Desktop.
Save dannyamey/1203739 to your computer and use it in GitHub Desktop.
The magic 8 ball knows all
#!/usr/bin/env bash
lines=(
'As I see it, yes.'
'Concentrate and ask again.'
'You may rely on it.'
'Signs point to yes.'
'My sources say no.'
'Ask again later.'
'It is decidedly so.'
'Without a doubt.'
"Don't count on it."
)
n=${#lines[@]}
r=$((RANDOM % n))
echo "${lines[r]}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment