URL:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=13041>
Summary: -i and - shouldn't be exclusive
Project: findutils
Submitted by: None
Submitted on: Mon 05/09/2005 at 23:59
Category: xargs
Severity: 3 - Normal
Item Group: Wrong result
Status: None
Privacy: Public
Assigned to: None
Originator Name: Alejandro Forero Cuervo
Originator Email: [EMAIL PROTECTED]
Open/Closed: Open
Release: 4.1.20
Fixed Release: None
_______________________________________________________
Details:
I can't xargs to work as I would expect it when I give it both the �-i� and
�-l� args. Using �-i� specifies �-l1� (as the documentation indicates) and
using �-l� seems to disable the functionality provided by �-i�.
This can be evidenced by using the following program:
main ( int argc, char **argv ) { int i; for (i = 0; i < argc; i ++) {
printf("Arg %d: [%s]\n", i, argv[i]); } }
When I build it and run it from xargs, I get the following:
> echo -e 'a\nb\nc' | xargs -l10 -i ./test {}
Arg 0: [./test]
Arg 1: [a]
Arg 0: [./test]
Arg 1: [b]
Arg 0: [./test]
Arg 1: [c]
> echo -e 'a\nb\nc' | xargs -i -l10 ./test {}
Arg 0: [./test]
Arg 1: [{}]
Arg 2: [a]
Arg 3: [b]
Arg 4: [c]
>
I was expecting to be able to combine �-i� and �-l� to get:
Arg 0: [./test]
Arg 1: [a]
Arg 2: [b]
Arg 3: [c]
I don't see anything in the semantics of �-i� and �-l� that makes them
exclude each other. Of course, in �-i�, the replace string (�{}�) would get
replaced with as many tokens from the input as permitted.
_______________________________________________________
Carbon-Copy List:
CC Address | Comment
------------------------------------+-----------------------------
bachue --AT-- bachue --DOT-- com | Originator Email
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=13041>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-findutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-findutils