1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-30 09:55:30 +02:00
tldr/pages/linux/shuf.md

20 lines
344 B
Markdown
Raw Normal View History

2014-09-08 13:27:44 +04:00
# shuf
> generate random permutations
2014-09-10 17:58:31 +04:00
- randomize the order of lines in a file and output the result
2014-09-08 13:27:44 +04:00
`shuf {{filename}}`
2014-09-10 17:58:31 +04:00
- only output the first n entries of the result
2014-09-08 13:27:44 +04:00
`shuf -n {{n}} {{filename}}`
- write output to another file
`shuf -o {{another_filename}} {{filename}}`
2014-09-10 17:58:31 +04:00
- generate random numbers in range
`shuf -i {{low}}-{{high}}`