tldr/pages/linux/shuf.md

20 lines
305 B
Markdown
Raw Normal View History

2014-09-08 10:27:44 +01:00
# shuf
> generate random permutations
- randomize strings position in file
`shuf {{filename}}`
- generate random numbers in range
2014-09-10 10:48:17 +01:00
`shuf -i {{low}}-{{high}}`
2014-09-08 10:27:44 +01:00
- take first n results from output
`shuf -n {{n}} {{filename}}`
- write output to another file
`shuf -o {{another_filename}} {{filename}}`