Skip to content

Instantly share code, notes, and snippets.

@ilikepi
Created April 26, 2011 00:04
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 ilikepi/941515 to your computer and use it in GitHub Desktop.
Save ilikepi/941515 to your computer and use it in GitHub Desktop.
can haz random line?
# output a random line of /etc/hosts via the most ugly means possible
sed -n $(perl -e 'printf "%s", int(rand(int(`wc -l /etc/hosts`)))+1;')p /etc/hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment