tldr/pages/linux/shuf.md

20 lines
294 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
`shuf -i LO-HI`
- take first n results from output
`shuf -n {{n}} {{filename}}`
- write output to another file
`shuf -o {{another_filename}} {{filename}}`