You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
shuf option descriptions are different from GNU, which could cause some confusion #193
shuf (V coreutils) 0.0.1
-----------------------------------------------
Usage: shuf [options] [ARGS]
Description: Shuffles its input by outputting a random permutation of its input lines
Options:
-e, --echo Treat each command-line operand as an input line
-i, --input-range <string>
Act as if input came from a file containing the range of unsigned decimal integers lo…hi, one per line
-n, --head-count <int> Output at most count lines. By default, all input lines are output
-o, --output <string> Write output to output-file instead of standard output
--random-source <string> Use file as a source of random data used to determine which permutation to generate
-r, --repeat Repeat output values
-z, --zero-terminated Delimit items with a zero byte rather than a newline
-h, --help display this help and exit
--version output version information and exit
Help us make V Coreutils better, by contributing your suggestions,
ideas and pull requests in https://github.com/vlang/coreutils
GNU shuf:
Usage: shuf [OPTION]... [FILE]
or: shuf -e [OPTION]... [ARG]...
or: shuf -i LO-HI [OPTION]...
Write a random permutation of the input lines to standard output.
With no FILE, or when FILE is -, read standard input.
Mandatory arguments to long options are mandatory for short options too.
-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
-o, --output=FILE write result to FILE instead of standard output
--random-source=FILE get random bytes from FILE
-r, --repeat output lines can be repeated
-z, --zero-terminated line delimiter is NUL, not newline
--help display this help and exit
--version output version information and exit
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/>
Full documentation <https://www.gnu.org/software/coreutils/shuf>
or available locally via: info '(coreutils) shuf invocation'
changed the title [-]shuf options are different from GNU, which could cause some confusion[/-][+]shuf option descriptions are different from GNU, which could cause some confusion[/+]on Dec 23, 2025
The four options that take an argument now carry an equals sign, which is the part
of GNU's spelling that carries the meaning:
-i, --input-range =LO-HI treat each number LO through HI as an input line
-n, --head-count =COUNT output at most COUNT lines
-o, --output =FILE write result to FILE instead of standard output
--random-source =FILE get random bytes from FILE
One limitation worth recording, because it is not fixable from this repository: the
flag module builds each line as '--${f.name} ${f.val_desc}', with a hardcoded space
between the name and the argument. So this produces --input-range =LO-HI and not
GNU's --input-range=LO-HI. Getting the exact spelling would mean changing vlib/flag/flag.v:680, which is in the V compiler.
The remaining differences are the same kind of thing: GNU prints a line reading
"Mandatory arguments to long options are mandatory for short options too." and a
footer pointing at its own online help, and this repository's common module prints a
different footer instead.
Activity
[-]shuf options are different from GNU, which could cause some confusion[/-][+]shuf option descriptions are different from GNU, which could cause some confusion[/+]shuf: match GNU's RNG and input handling
shuf: match GNU's RNG and input handling (#198)
shuf: mark the options that take an argument with an equals sign
metif12 commentedon Oct 6, 2026
The four options that take an argument now carry an equals sign, which is the part
of GNU's spelling that carries the meaning:
One limitation worth recording, because it is not fixable from this repository: the
flag module builds each line as
'--${f.name} ${f.val_desc}', with a hardcoded spacebetween the name and the argument. So this produces
--input-range =LO-HIand notGNU's
--input-range=LO-HI. Getting the exact spelling would mean changingvlib/flag/flag.v:680, which is in the V compiler.The remaining differences are the same kind of thing: GNU prints a line reading
"Mandatory arguments to long options are mandatory for short options too." and a
footer pointing at its own online help, and this repository's common module prints a
different footer instead.
numfmt: restore the number_str the build needs, and sort: capture -z …
cp, mv: add a -progress option (#230)
pathchk: implement it (#231)
README: mark pathchk done (#232)
tsort: implement it (#233)
README: mark tsort done (#234)
dircolors: implement it (#235)
Add GitHub Action to auto-update README completed count (#238)
tr: implement it (#239)
README: mark dircolors done (#236)
date + realpath: new tools (#237)