Skip to content

Instantly share code, notes, and snippets.

@rhardih
Created November 20, 2016 17:08
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 rhardih/d0cda59bb18037a5e4c2b1c5c91f19c7 to your computer and use it in GitHub Desktop.
Save rhardih/d0cda59bb18037a5e4c2b1c5c91f19c7 to your computer and use it in GitHub Desktop.
List a random file from the current directory
ls | head -$(($RANDOM % `ls | wc -l` + 1)) | tail -1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment