Gilles Dartiguelongue wrote: > I haven't reread the fine mans for a while but iirc, + could lead you to > hit the argument buffer limit of your shell. xargs has --max-args to get > around that and is also way faster than any -exec variant (at least > that's what the bench I did on a PIV2.6Ghz showed me about 4 months ago) > It doesn't: find will just execute the command as many times as needed (each time with an argument length maximally less than ARG_MAX. Well, it did when we tested this a couple of months ago.) So it's optimal in that sense. I have no idea on the timing measurements, but I don't like pipes and subshells as a rule (externals are bad enough!;>) It'd be interesting to see measurements over 100000 loops with long argument lists requiring multiple invocations per pass, I suppose.
An array expansion can lead to an argument length greater than ARG_MAX however, eg funcToFix "[EMAIL PROTECTED]" (I'd be kind of perturbed if the last case were infeasible since it would imply poor memory handling in BASH, and limit the scope of its usability.) -- [EMAIL PROTECTED] mailing list
