SHUF(1)
π¦ NAME
okay so shuf β it generates random permutations. That's it, that's the whole vibe: you give it lines, it gives them back to you in a scrambled order. β¨
πΈ SYNOPSIS
shuf [OPTION]... [FILE]
shuf -e [OPTION]... [ARG]...
shuf -i LO-HI [OPTION]...
π DESCRIPTION
Bestie. It writes a random permutation of the input lines to standard output. That's giving shuffle, that's giving chaos, that's giving main character energy for your data. π
If there's no FILE, or if FILE is -, it reads standard input instead. So you can absolutely pipe stuff into it, she loves that. π«Ά
Mandatory arguments to long options are mandatory for short options too. (yes really, no cap β if it needs a value, it needs a value either way π )
β¨ the options, queen β¨
-e,--echoβ treat each ARG as an input line. So the arguments themselves are the lines getting shuffled.-i,--input-range=LO-HIβ treat each number LO through HI as an input line. Build the lines for her, she'll scramble them.-n,--head-count=COUNTβ output at most COUNT lines. Like, she'll only hand you back that many.-o,--output=FILEβ write the result to FILE instead of standard output.--random-source=FILEβ get random bytes from FILE. That's where the randomness comes from, iykyk.-r,--repeatβ output lines can be repeated. Yes, duplicates are allowed, she's not judging.-z,--zero-terminatedβ line delimiter is NUL, not newline. For those of you living that NUL-separated life. π§--helpβ display this help and exit. Classic. Iconic.--versionβ output version information and exit.
π AUTHOR
Written by Paul Eggert. We stan. π
π REPORTING BUGS
Found a bug? Tell the people, bestie:
- Report bugs to:
bug-coreutils@gnu.org - GNU coreutils home page:
https://www.gnu.org/software/coreutils/ - General help using GNU software:
https://www.gnu.org/gethelp/ - Report any translation bugs to:
https://translationproject.org/team/
π SEE ALSO
- Full documentation:
https://www.gnu.org/software/coreutils/shuf - or available locally via:
info '(coreutils) shuf invocation'β literally right there on your machine, go look π - Packaged by Ubuntu (
9.10-1ubuntu2) - Copyright Β© 2026 Free Software Foundation, Inc.
- License GPLv3+: GNU GPL version 3 or later
https://gnu.org/licenses/gpl.html. - This is free software: you are free to change and redistribute it.
- There is NO WARRANTY, to the extent permitted by law.
fr fr, there is genuinely no warranty. Read that part twice. π
okay bye bestie, go shuffle something π this was GNU coreutils 9.10, dated August 2026 β slay, periodt. π β
π¦ where this page comes from
- ubuntu stonking: gnu-coreutils 9.10-1ubuntu2 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms