SHUF(1)
โจ NAME โจ
shuf โ bestie, this generates random permutations ๐
๐ธ SYNOPSIS ๐ธ
shuf [OPTION]... [FILE]
shuf -e [OPTION]... [ARG]...
shuf -i LO-HI [OPTION]...
๐ฆ DESCRIPTION ๐ฆ
Okay so here's the tea: shuf writes a random permutation of the input lines to standard output. That's it. That's the whole vibe. It shuffles your lines and gives them back to you in a different order. Iconic behavior, no notes. ๐
If there's no FILE, or if FILE is -, it reads from standard input. So you can pipe stuff in like it's nothing.
Mandatory arguments to long options are mandatory for short options too. (iykyk โ this is the standard GNU rule, fr fr.)
-e,--echoโ treat each ARG as an input line ๐ซถ-i,--input-range=LO-HIโ treat each number LO through HI as an input line ๐ข-n,--head-count=COUNTโ output at most COUNT lines, like a little snack portion โจ-o,--output=FILEโ write the result to FILE instead of standard output ๐--random-source=FILEโ get random bytes from FILE ๐ฒ-r,--repeatโ output lines can be repeated, so yes you might see the same line twice, that's on purpose ๐-z,--zero-terminatedโ line delimiter is NUL, not newline โญ--helpโ display this help and exit ๐--versionโ output version information and exit ๐
๐ AUTHOR ๐
Written by Paul Eggert. We stan. ๐ซถ
๐ REPORTING BUGS ๐
Found something cursed? Tell the devs, bestie:
- Report bugs to: <bug-coreutils@gnu.org>.
- Report any translation bugs to: <https://translationproject.org/team/>.
- GNU coreutils home page: <https://www.gnu.org/software/coreutils/>
- General help using GNU software: <https://www.gnu.org/gethelp/>
๐ COPYRIGHT ๐
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. ๐ญ Not even a little one. None. Zero. Nada.
๐ง SEE ALSO ๐ง
- Full documentation <https://www.gnu.org/software/coreutils/shuf>
- or available locally via:
info '(coreutils) shuf invocation'
Okay that's the whole page, bestie โ go forth and shuffle. This was GNU coreutils 9.12, dated September 2026. Mwah. ๐ โจ
๐ฆ where this page comes from
- arch rolling: coreutils 9.12-2 ยท GPL-3.0-or-later AND GFDL-1.3-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms