[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [OT] Collective memory query



On 28 Sep 2004, Bernd Eckenfels wrote:
> In article <[🔎] 87mzzbetsn.fsf@enki.rimspace.net> you wrote:
>> Alternately, with sed:
>>
>> ] sed -si.orig -e '...' `find . -name '...'`
>>
>> More safely, but with more forks:
>>
>> ] find . -name '...' -print0 | xargs -0 sed -si.orig -e '...'
>
> BTW: I dont see how xarg would do more forks than the shell? Because the
> above version will fork once or not at all (if argument list is too long)
> and the below solution will fork as much as needed (which is once in cae the
> list fits into the command line). So xargs only forks one more than the
> backtick version.

Last time I read the xargs documentation it stated that using '\0' as an
input separator would also tell it to pass at most one argument to the
command.

Perhaps this has changed in the intervening years, since I didn't check
that recently.

Regards,
        Daniel
-- 
The truth knocks on the door and you say, 'Go away, I'm looking for
the truth,' and so it goes away. Puzzling...
        -- Robert Pirsig



Reply to: