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/



_______________________________________________
Bug-findutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-findutils

Reply via email to