Documentation
¶
Overview ¶
Package xargs implements the POSIX xargs utility.
It reads arguments from the standard input or the file of the -a option, delimited by unquoted blanks, newlines, null bytes or a given delimiter, and invokes the utility operand with them, in groups that fit the count and length limits given by the options.
The GNU extensions are supported as well: -0 (--null), -a (--arg-file), -d (--delimiter), --replace, --max-lines, --max-args, --max-chars, --eof, --no-run-if-empty, --interactive, --exit and --verbose. The -P (--max-procs), -o (--open-tty), --show-limits and --process-slot-var options are not implemented.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Prog ¶
Prog is the xargs core utility.
func (*Prog) Run ¶
Run invokes the utility operand with the arguments read from the input source, as many per invocation as the options allow. The utility defaults to echo, and an invocation that exits with 255 or 125 stops the processing, as do the utilities that cannot be run at all.
Invocations stop when ctx is done, and the context error is returned.