[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch #4371] Document interaction of -I with other options
From: |
James Youngman |
Subject: |
[patch #4371] Document interaction of -I with other options |
Date: |
Mon, 29 Aug 2005 10:25:48 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050730 Firefox/1.0.6 (Debian package 1.0.6-2) |
Follow-up Comment #2, patch #4371 (project findutils):
Eric Blake had originally said:
The documentation for xargs could use several improvements. The Invoking
`xargs' section of the info pages do not mention -E or -L, and implies that
-I's argument is optional when it is not. Showing the difference between -i
and -I may be useful:
$ echo 1 | xargs -i echo echo {} echo # replace {} in 'echo {} echo'
echo 1 echo
$ echo 1 | xargs -iecho echo {} echo # replace echo in '{} echo'
{} 1
$ echo 1 | xargs -I echo echo {} echo # replace echo in '{} echo'
{} 1
$ echo 1 | xargs -Iecho echo {} echo # replace echo in '{} echo'
{} 1
It also fails to mention that -L and -n are mutually exclusive, and that
since -i/-I implies -L1, that the use of -i and -n is order-dependent. As an
example,
$ echo -e '1\n2' | xargs -i -n 2 echo {}
{} 1 2
$ echo -e '1\n2' | xargs -n 2 -i echo {}
1
2
Meanwhile, the output of 'xargs --help' is pretty sparse, especially when
compared with the --help output of other GNU utilities such as ls(1), and
fails to mention -L, -E, or -I.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?func=detailitem&item_id=4371>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/