Subject: Re: Suggestion: inclusion of the truncate(1) utility into the tree
To: Kevin P. Neal <firstname.lastname@example.org>
From: Andrew Brown <email@example.com>
Date: 07/24/2000 12:19:59
>> find foo -type f -name \*.bar | xargs mv -t otherthere
>> or is it just me?
>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
>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'
which i also don't like. that much. i'd just do
mv `find foo -type f -name \*.bar` otherthere
but there are limits on the size and length of the arg list. :(
|-----< "CODE WARRIOR" >-----|
firstname.lastname@example.org * "ah! i see you have the internet
email@example.com (Andrew Brown) that goes *ping*!"
firstname.lastname@example.org * "information is power -- share the wealth."