1 .\" $NetBSD: xargs.1,v 1.7 1997/06/24 00:45:28 lukem Exp $
3 .\" Copyright (c) 1990, 1991, 1993
4 .\" The Regents of the University of California. All rights reserved.
6 .\" This code is derived from software contributed to Berkeley by
7 .\" John B. Roll Jr. and the Institute of Electrical and Electronics
10 .\" Redistribution and use in source and binary forms, with or without
11 .\" modification, are permitted provided that the following conditions
13 .\" 1. Redistributions of source code must retain the above copyright
14 .\" notice, this list of conditions and the following disclaimer.
15 .\" 2. Redistributions in binary form must reproduce the above copyright
16 .\" notice, this list of conditions and the following disclaimer in the
17 .\" documentation and/or other materials provided with the distribution.
18 .\" 3. All advertising materials mentioning features or use of this software
19 .\" must display the following acknowledgement:
20 .\" This product includes software developed by the University of
21 .\" California, Berkeley and its contributors.
22 .\" 4. Neither the name of the University nor the names of its contributors
23 .\" may be used to endorse or promote products derived from this software
24 .\" without specific prior written permission.
26 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38 .\" @(#)xargs.1 8.1 (Berkeley) 6/6/93
45 .Nd "construct argument list(s) and execute utility"
54 .Op Ar utility Op Ar arguments ...
58 utility reads space, tab, newline and end-of-file delimited arguments
59 from the standard input and executes the specified
64 The utility and any arguments specified on the command line are given
67 upon each invocation, followed by some number of the arguments read
71 is repeatedly executed until standard input is exhausted.
73 Spaces, tabs and newlines may be embedded in arguments using single
75 or double (``"'') quotes or backslashes (``\e'').
76 Single quotes escape all non-single quote characters, excluding newlines,
77 up to the matching single quote.
78 Double quotes escape all non-double quote characters, excluding newlines,
79 up to the matching double quote.
80 Any single character, including newlines, may be escaped by a backslash.
82 The options are as follows:
87 instead of whitespace as the argument separator.
88 This can be used in conjuction with the
93 Set the maximum number of arguments taken from standard input for each
94 invocation of the utility.
99 standard input arguments if the number of bytes accumulated (see the
101 option) exceeds the specified
103 or there are fewer than
105 arguments remaining for the last invocation of
107 The current default value for
111 Set the maximum number of bytes for the command line length provided to
113 The sum of the length of the utility name and the arguments passed to
117 terminators) will be less than or equal to this number.
118 The current default value for
124 Echo the command to be executed to standard error immediately before it
129 to terminate immediately if a command line containing
131 arguments will not fit in the specified (or default) command line length.
140 Undefined behavior may occur if
142 reads from the standard input.
146 utility exits immediately (without processing any further input) if a
147 command line cannot be assembled,
149 cannot be invoked, an invocation of the utility is terminated by a signal
150 or an invocation of the utility exits with a value of 255.
153 exits with one of the following values:
154 .Bl -tag -width Ds -compact
158 returned a zero exit status.
160 One or more invocations of
162 returned a nonzero exit status.
166 exited with a 255 exit status.
170 was killed or stopped by a signal.
174 was found but could not be invoked.
180 Some other error occurred.
188 utility is expected to be
192 The meaning of 123, 124, and 125 exit values were taken from GNU xargs.