]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/man/1/xargs
/sys/man/1/mothra: add description of Plumb menu item.
[plan9front.git] / sys / man / 1 / xargs
index db0af6260be8e0a8ebea75a11c29e7464e4fc725..3a30f8b0ec7dbbc8b56194504ac6b0bf8ad642a6 100644 (file)
@@ -10,24 +10,38 @@ xargs \- construct argument list and execute
 .B -p
 .I maxprocs
 ]
-.I args
+.B cmd
+[
+.I arg ...
+]
 .SH DESCRIPTION
-The
-.I xargs
-utility reads space, tab, newline, and end-of-file delimited strings from the standard input and executes the specified utility with the strings as arguments.
-.PP
-Any arguments specified on the command line are given to the utility upon each invocation, followed by some number of the arguments read from standard input.  The utility is repeatedly executed one or more times until standard input is exhausted.
+.I Xargs
+reads
+.B number
+(default 10) lines from
+standard input and runs the given
+.B cmd
+with those lines as arguments. This is repeated until standard input is exhausted.
 .PP
 Options are as follows:
 .TP
 .B  -n
 Set
 .I number
-as the maximum number of arguments taken from standard input for each invocation.
+as the maximum number of lines taken from standard input for each invocation.
 .TP
 .B  -p
 Parallel mode: run
 .I maxprocs
 invocations at once.
+.SH EXAMPLE
+.IP
+.EX
+seq 1 9 | xargs -n 3 echo
+.EE
+.LP
 .SH SOURCE
 .B /sys/src/cmd/xargs.c
+.SH HISTORY
+.I Xargs
+was implemented from scratch for 9front (August, 2011).