Bug 86191 - xargs options don't work as expected
xargs options don't work as expected
Product: Red Hat Linux
Classification: Retired
Component: findutils (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2003-03-16 13:57 EST by jmbastia
Modified: 2007-04-18 12:52 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-03-17 08:23:52 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description jmbastia 2003-03-16 13:57:22 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130

Description of problem:
The -i option to xargs only works if it's the last option specified.

$ echo Hi | xargs -i -n1 echo {} There
{} There Hi

$ echo Hi | xargs -n1 -i echo {} There
Hi There

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Use 2 or more options (including -i) with xargs
2. If -i is not the last option, the {} replace string doesn't work


Actual Results:  {} became an argument to the command instead of being replaced
by input from STDIN

Expected Results:  {} should have been replaced by input from STDIN

Additional info:

Bug also appears in RedHat 7.3 (findutils-4.1.7-4)
Comment 1 Tim Waugh 2003-03-17 08:23:52 EST
Actually of course -i isn't really compatible with -n in general.  For the
specific case -n1 it is though, so I've made it ignore the -n option in that case.

Fixed package is findutils-4.1.7-10, which will appear in rawhide in due course.

Note You need to log in before you can comment on or make changes to this bug.