Subject: Re: Suggestion: inclusion of the truncate(1) utility into the tree
To: Kevin P. Neal <>
From: Andrew Brown <>
List: tech-userlevel
Date: 07/24/2000 12:27:30
>> >Wouldn't it be "more portable" if xargs was updated to be more complete?
>> >HP-UX xargs allows for the substitution of a string with the input
>> >given to xargs. The string to be substituted can be specified with an
>> >additional argument. 
>> >
>> >find foo -type f -name \*.bar | xargs -iBAZ mv BAZ otherthere
>> >
>> >As near as I can tell offhand, GNU and HP-UX xargs support this.
>> wouldn't that cause one execution per argument?  if so, i'd be just as
>> well off doing something like:
>> 	find foo -type f -name \*.bar | \
>> 	sh -c 'while read i; do mv $i otherthere; done'
>Hmmm. Looks like you are correct, it does cause one execution per argument.


>That's a performance lose, but xargs is still more portable than a new

a xargs that does this or the cp/mv that does that...either way it's
not portable.

|-----< "CODE WARRIOR" >-----|             * "ah!  i see you have the internet (Andrew Brown)                that goes *ping*!"       * "information is power -- share the wealth."