[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #55190] xargs documentation is confusing about the usage of -i and

From: Bernhard Voelker
Subject: [bug #55190] xargs documentation is confusing about the usage of -i and -I (capital i), and doesn't have any examples on this options
Date: Mon, 10 Dec 2018 09:28:00 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0

Follow-up Comment #1, bug #55190 (project findutils):

Regarding the terms "replace" vs. "substitute": for me as non-English-native
there's no difference between 'replace' and 'substitute.

Your example can be simplified by avoiding the files AAA.txt and BBB.txt:
it simply reads:

  $ echo line | xargs -I {} echo line2

As documented both in the man page and the Texinfo manual - and even in "xargs
the -I option works on the "initial arguments".  Looking at the synopsis

Usage: xargs/xargs [OPTION]... COMMAND [INITIAL-ARGS]...
  -I R                         same as --replace=R
  -i, --replace[=R]            replace R in INITIAL-ARGS with names read
                                 from standard input; if R is unspecified,
                                 assume {}

In your example above, the initial args is the string "line2". So there xargs
cannot replace '{}' because there is none.

2) findutils' info pages _has_ a separate node to explain -I,-e,--replace
incl. examples:


With the above, do you see things in the documentation which could
be improved?  Concrete suggestions and patches welcome. ;-)

Have a nice day,


Reply to this item at:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]