Re: feature request: zero-terminated lines for comm
From:
Brian Dessent
Subject:
Re: feature request: zero-terminated lines for comm
Date:
Mon, 10 Sep 2007 06:30:16 -0700
James Youngman wrote:
> I beg your pardon. Of course I meant -I.
>
> $ printf "one two\nthree four\n" | xargs -I {} showargs {}
> argv[0] = /home/youngman/bin/showargs
> argv[1] = one two
> argv[0] = /home/youngman/bin/showargs
> argv[1] = three four
I see. But, using -I forces one invocation of the command for every
argument which is a huge efficiency hit. You might as well stop using
xargs at that point and just do it with the shell as "| (while read F;
do command "$F"; done)" because you've lost the entire advantage of
using xargs. So I still maintain that xargs without -print0/-0 is
deficient.
Brian