linux: shuf
This commit is contained in:
19
pages/linux/shuf.md
Normal file
19
pages/linux/shuf.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# 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}}`
|
Reference in New Issue
Block a user