Skip to content

Instantly share code, notes, and snippets.

@igilham
Created January 5, 2011 16:05
Show Gist options
  • Save igilham/766503 to your computer and use it in GitHub Desktop.
Save igilham/766503 to your computer and use it in GitHub Desktop.
Read a random line from a text file
shuf -n 1 oblique.txt
# or
rl -c 1 oblique.txt
# or
sed -n $((RANDOM%$(wc -l < leader.txt)+1))p oblique.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment