On 2/13/06, Stuart Henderson <[EMAIL PROTECTED]> wrote:
> On 2006/02/13 16:53, Jason Crawford wrote:
> > On 2/13/06, Matthias Kilian <[EMAIL PROTECTED]> wrote:
> > > On Mon, Feb 13, 2006 at 02:03:27PM -0700, Diana Eichert wrote:
> > > > find /usr/src -name "*.[c|h]" -exec grep 'bpf.h' /dev/null {} \;
> > >                            ^(a) ^^^^^(b)
> > >
> > > (a) I doubt there are any file names ending in a pipe symbol in /usr/src.
> > man ksh
>
> it's in quotes, this is handled by find, not the shell.

Right, my mistake.

> > > (b) pipeing to xargs(1) may be faster.
> > why?
>
> grep foo 1 2 3 4 5 6 7 ...
>
> vs.
>
> grep foo 1
> grep foo 2
> grep foo 3
> grep foo 4
> grep foo 5
> grep foo 6
> grep foo 7

Well in the case of /usr/src, I think you must MIGHT hit the maximum
argument length for the shell by using xargs, unless you did it inside
of each directory in /usr/src. That and well, explaining xargs to Dave
will end up leading to another 20+ mail thread....

Jason

Reply via email to