xargs

NAME

xargs - Windows command-line utility to constructs argument lists and invoke a utility

SYNOPSIS

xargs [-t] [-p] [-e[eofstr]] [-E eofstr] [-I replstr] 
	[-i[replstr]] [-L number] [-l [number]] 
	[-n number [-x]] [-s size] [utility [argument...]]

DESCRIPTION

The xargs(1w) Windows utility constructs a command line consisting of the specified utility and argument operands. This is followed by as many arguments as will fit, according to the length and number of constraints specified by the options. The arguments are read in sequence from the standard input. The xargs utility then invokes the constructed command line and waits for its completion. This sequence is repeated until an end-of-file condition is detected on the standard input, or an invocation of a constructed line returns an exit status of 255.

The xargs utility supports the following options:

-e
eofstr is taken as the logical end-of-file string. Underscore (_) is assumed for the logical EOF string if neither -e nor -E is specified. The value -e with no specified eofstr turns off the logical EOF string capability (underscore is taken literally). The xargs utility reads the standard input until it encounters end-of-file or the logical EOF string.
-E
Specifies a logical end-of-file string to replace the default underscore. The xargs utility reads standard input until it encounters end-of-file or the logical EOF string.
-I
Insert mode. The utility is run for each line from the standard input, taking the entire line as a single argument and inserting it into initial-arguments for each occurrence of replstr. A maximum of five arguments in initial-arguments can each contain one or more instances of replstr. Blanks and tabs at the beginning of each line are discarded. Constructed arguments cannot exceed 255 bytes. The -I option forces the -x option. The -I and -i options are mutually exclusive; the last one specified takes effect.
-i
This option is equivalent to -I [replstr]. The string{} is assumed for replstr if the option argument is omitted.
-L
The utility is run for each nonempty number lines of arguments from the standard input. The last invocation of utility will contain fewer lines of arguments than specified if fewer than number remain. A line is considered to end with the first newline unless the last character of the line is a blank or a tab. A trailing blank or tab signals continuation through the next nonempty line. The -L, -l, and -n options are mutually exclusive; the last one specified takes effect.
-l (Lowercase L)
This option is equivalent to -L number. If number is omitted, 1 (one) is assumed. The -l option forces the -x option.
-n
Runs utility using as many standard input arguments as possible, up to a maximum of number (a positive decimal integer) arguments. Fewer arguments are used if either of the following conditions exist:
-p
(Prompt mode) Asks the user whether to run utility at each invocation. Trace mode (-t option) is turned on to print the utility to be run, followed by a prompt to the standard error. A reply of y (optionally followed by anything) runs utility. Anything else, including just a carriage return, skips that particular invocation of utility.
-s
Invokes utility using as many standard input arguments as possible, yielding a command-line length less than size (a positive decimal integer) bytes. Fewer arguments will be used if any of the following conditions exist:
-t
(Trace mode) The utility and each constructed argument list are echoed to standard error just prior to their execution.
-x
Causes xargs to terminate if any argument list would be greater than size characters. The -i, -I, -l, and -L options force the -x option. When none of the options -i, -I, -l, -L, or -n are specified, the total length of all arguments must be within the size limit.

DIAGNOSTICS

Possible exit-status values are:

0
Successful completion
126
The utility was found but could not be invoked.
127
The utility could not be found.
Exit code of the invoked utility
One or more of the invocations of utility returned a nonzero status.