Add a New Comment (Rich Markup)
Marking this as a duplicate of https://savannah.gnu.org/bugs/?52137
I know the BUGS section of the man page mentions "The -L option is incompatible with the -I option, but perhaps should not be." So while I would expect the combination of the two to never work given that sentence in the man page, some coworkers have apparently been using them together for years. Here's an example with a three line file:
$ cat test.txt | xargs -I{} -L1 bash -c "echo {}" {} {} {} $ cat test.txt | xargs -L1 -I{} bash -c "echo {}" a b c
It seems the order of the -L and -I arguments determines the output which was unexpected. This has been noticed on the xargs that comes with CentOS 6/7 and Ubuntu, but the BSD version that comes with OSX seems to not depend on the order. Version info: $ xargs --version xargs (GNU findutils) 4.6.0.225-235f Copyright (C) 2019 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Eric B. Decker, James Youngman, and Kevin Dalley.
(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)
Attach Files: Comment:
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Only logged-in users can vote.
Please enter the title of George Orwell's famous dystopian book (it's a date):
Follow 3 latest changes.
Copyright © 2023 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.11