Skip to content

Instantly share code, notes, and snippets.

@fallwith
Created May 18, 2012 23:36
Show Gist options
  • Save fallwith/2728143 to your computer and use it in GitHub Desktop.
Save fallwith/2728143 to your computer and use it in GitHub Desktop.
Bash: Echo a random word
alias word='d=/usr/share/dict/words; rand=$[($RANDOM % `wc -l $d|sed "s/[^0-9]//g"`)+1]; sed $rand"q;d" $d'
@Lydon-01
Copy link

Seems like it only returns a word starting with a,b or c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment