bugfindutils - Bugs: bug #36452, xargs needs "-I" (eye)...


bug #36452: xargs needs "-I" (eye) last ...

Submitted by:  Kevin <dalecosp>
Submitted on:  Fri 11 May 2012 05:16:28 PM UTC  
Category:  xargs Severity:  3 - Normal
Item Group:  Wrong result Status:  Invalid
Privacy:  Public Assigned to:  James Youngman <jay>
Originator Name:  Open/Closed:  Closed
Release:  4.4.2 Fixed Release:  None

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Fri 11 May 2012 07:47:09 PM UTC, comment #2:

Thanks for the clue-stick, Eric. Looking for "close". I probably don't have that option, eh?

Kevin <dalecosp>
Fri 11 May 2012 05:21:38 PM UTC, comment #1:

POSIX states that mixing -I and -L is not portable:


You are using a non-portable command line, and so it should come as no surprise that BSD and GNU xargs differ in behavior.

That said, you are not the first to request having -I and -L work together, and presumably with semantics similar to BSD, or even at a bare minimum to error out instead of silently changing behavior depending on argument ordering; but no one has bothered to write and submit such a patch.

Eric Blake <ericb>
Project Administrator
Fri 11 May 2012 05:16:28 PM UTC, original submission:

I ran an xargs(1) command in the BSD implementation with success and posted the result at [url=http://board.phpbuilder.com/board/showthread.php?t=10384409 PHPBuilder]. Lo & behold, it didn't work in a seven-year old version of GNU xargs(1) ... unless we changed the invocation to put "-I" last, before argument.

On GNU IRC's #gnu, user leo_rockway tested with findutils version 4.4.2, which appears to be the latest available on most(?) public [url=http://ftp.gnu.org/pub/gnu/findutils/ FTP sites].

To recap, this works in a non-GNU xargs(1) implementation:

However, with GNU xargs(1) <=4.4.2, this results in convert complaining:

Changing the invocation of GNU xargs(1) to this:

Allows convert to function normally and complete the command (i.e. it gets the correct arguments). The only difference seems to be the location of the "-I" parameter.

I do apologize if this has been fixed since 4.4.2 --- I see that several other 'releases' seem to be in the Fixed Release selector, but, as I mentioned, I don't see them on the public FTP sites. I'm a bit of a "newb" where GNU/Linux are concerned, having spent years with the BSD family of OSen. Thanks for your time and contributions.

Kevin <dalecosp>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by jay (Updated the item)
  • -email is unavailable- added by ericb (Posted a comment)
  • -email is unavailable- added by dalecosp (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    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.

    Date Changed by Updated Field Previous Value => Replaced by
    Wed 25 Sep 2013 09:04:30 PM UTC jay StatusNone => Invalid
        Assigned toNone => jay
        Open/ClosedOpen => Closed

    Back to the top

    Powered by Savane 3.3