shuf

Source: Wikipedia, the free encyclopedia.
shuf
coreutils: GNU GPL v3

shuf is a

random
permutations of the input.

The version of shuf bundled in

coreutils was written by Paul Eggert. It is not a part of POSIX.[1]

Example

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

See also

References

  1. ^ shuf(1) – Linux General Commands Manual
This page is based on the copyrighted Wikipedia article: Shuf. Articles is available under the CC BY-SA 3.0 license; additional terms may apply.Privacy Policy