Bug 86191 - xargs options don't work as expected
Summary: xargs options don't work as expected
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: findutils
Version: 8.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-03-16 18:57 UTC by jmbastia
Modified: 2007-04-18 16:52 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2003-03-17 13:23:52 UTC
Embargoed:


Attachments (Terms of Use)

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):
findutils-4.1.7-7

How reproducible:
Always

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.


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