URL:
<https://savannah.gnu.org/bugs/?55190>
Summary: xargs documentation is confusing about the usage of
-i and -I (capital i), and doesn't have any examples on this options
Project: findutils
Submitted by: None
Submitted on: Mon 10 Dec 2018 03:47:22 AM UTC
Category: xargs
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Originator Name: lockywolf
Originator Email: [email protected]
Open/Closed: Open
Discussion Lock: Any
Release: 4.6.0
Fixed Release: None
_______________________________________________________
Details:
These are actually two different questions, but I find them often found
together.
1)-I option is called 'replace-str', which to me is particularly confusing,
because by 'replace' I usually mean some sort of post-processing of my data.
The wording convenient to me (and I suspect, to many other people) would be
'substitute'.
Initially, I understood this option as if it replaces the input to xargs with
itself. That is, for the command:
AAA.txt:
line
BBB.txt:
line2
cat AAA.txt | xargs -I {} echo `cat BBB.txt'
I expected the final commannd to be
echo {}2
But the actual command is:
echo line2 line
2)There are no examples in the info xargs which could debunk my
misunderstanding.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?55190>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/