shuf
Generate random permutations. More information: https://www.gnu.org/software/coreutils/manual/html_node/shuf-invocation.html.
- Randomize the order of lines in a file and output the result:
shuf
- Only output the first 5 entries of the result:
shuf 5
- Write the output to another file:
shuf
- Generate 3 random numbers in the range 1-10 (inclusive, numbers can repeat):
shuf 3 1-10
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
