1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-11-01 17:17:56 +01:00
tldr/pages/linux/shuf.md
2016-01-08 09:38:59 +01:00

349 B

shuf

Generate random permutations.

  • Randomize the order of lines in a file and output the result:

shuf {{filename}}

  • Only output the first n entries of the result:

shuf -n {{n}} {{filename}}

  • Write output to another file:

shuf -o {{another_filename}} {{filename}}

  • Generate random numbers in range:

shuf -i {{low}}-{{high}}