Created
November 20, 2016 17:08
-
-
Save rhardih/d0cda59bb18037a5e4c2b1c5c91f19c7 to your computer and use it in GitHub Desktop.
List a random file from the current directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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