On 2006-02-13 18:10:53 -0500, Tim Donahue wrote:
> As done by xargs?
> > grep foo 1
> > grep foo 2
> > grep foo 3
<quote src=xargs(1)>
Any arguments specified on the command line are given to the utility upon
each invocation, followed by some number of the arguments read from stan-
dard input. The utility is repeatedly executed until standard input is
exhausted.
</quote>
> Wouldn't for a small list -exec be faster as it is a single invocation of the
> grep vs multiple invocations of grep for xargs.
There won't be more invocations than necessary.
> IIRC, the reason xargs exists is to get around limits posed by the number of
> args an application like rm or grep can take when passed a large list of
> arguments like, say, a recursive find for old files in your spam
> quarantine :-).
That is _one_ reason.
Best
Martin
--
http://www.tm.oneiros.de