Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167672301
D25214.id72934.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
994 B
Referenced Files
None
Subscribers
None
D25214.id72934.diff
View Options
Index: xargs/xargs.1
===================================================================
--- xargs/xargs.1
+++ xargs/xargs.1
@@ -325,6 +325,31 @@
If any other error occurs,
.Nm
exits with a value of 1.
+.Sh EXAMPLES
+Create a 3x3 matrix with numbers from 1 to 9. Every
+.Xr echo 1
+instance receives three lines as arguments:
+.Bd -literal -offset indent
+$ seq 1 9 | xargs -L3 echo
+1 2 3
+4 5 6
+7 8 9
+.Ed
+.Pp
+Duplicate every line from standard input:
+.Bd -literal -offset indent
+$ echo -e "one\\ntwo\\nthree" | xargs -I % echo % %
+one one
+two two
+three three
+.Ed
+.Pp
+Execute at most 2 concurrent instances of
+.Xr find 1
+every one of them using one of the directories from the standard input:
+.Bd -literal -offset indent
+echo -e "/usr/ports\\n/etc\\n/usr/local" | xargs -J % -P2 -n1 find % -name file
+.Ed
.Sh SEE ALSO
.Xr echo 1 ,
.Xr find 1 ,
@@ -336,7 +361,7 @@
.St -p1003.2
compliant.
The
-.Fl J , o , P, R
+.Fl J , o , P , R
and
.Fl S
options are non-standard
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Aug 24, 4:53 PM (22 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37193044
Default Alt Text
D25214.id72934.diff (994 B)
Attached To
Mode
D25214: xargs(1): Add EXAMPLES section
Attached
Detach File
Event Timeline
Log In to Comment