Jump to content

Shuf

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Cedar101 (talk | contribs) at 09:01, 7 October 2015 (<source lang="console">). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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