Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 86191

Summary: xargs options don't work as expected
Product: [Retired] Red Hat Linux Reporter: jmbastia
Component: findutilsAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: jmbastia
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-03-17 13:23:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description jmbastia 2003-03-16 18:57:22 UTC
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 13:23:52 UTC
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.