Shuf

For the district in Lebanon, see Chouf District.

shuf is a command-line utility included in the textutils package of GNU Core Utilities for creating a standard output consisting of random permutations of the input:

$ ls
Wikibooks  Wikipedia  Wiktionary
$ # Shuffles input 
$ ls | shuf 
Wikipedia
Wiktionary
Wikibooks
$ # Picks one random line from input
$ ls | shuf -n1
Wikipedia

See also

This article is issued from Wikipedia - version of the 10/7/2015. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.