Skip to content

Instantly share code, notes, and snippets.

@celoyd
Created June 30, 2014 17:45
Show Gist options
  • Select an option

  • Save celoyd/1d5887e0df228a228d9d to your computer and use it in GitHub Desktop.

Select an option

Save celoyd/1d5887e0df228a228d9d to your computer and use it in GitHub Desktop.
# To help with https://xkcd.com/936/
randword () {
dict=/usr/share/dict/words
r=$((($RANDOM * $RANDOM) % `wc -l $dict | awk '{print $1}'`))
head -n $r $dict | tail -n 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment