Files
oam/knowledge base/shuf.md
2022-05-15 00:24:53 +02:00

18 lines
293 B
Markdown

# Shuf
## TL;DR
```sh
# randomize the order of lines in a file and output the result
shuf filename
# only output the first 5 entries of the result
shuf -n 5 filename
# write output to another file
shuf filename -o output_filename
# generate random numbers in range 1-10:
shuf -i 1-10
```