Date: Mon, 22 Jan 1996 17:56:34 -0800 From: "Justin T. Gibbs" <gibbs@freefall.freebsd.org> To: Josh MacDonald <jmacd@CS.Berkeley.EDU> Cc: Warner Losh <imp@village.org>, Wolfram Schneider <wosch@cs.tu-berlin.de>, hackers@freebsd.org Subject: Re: recursive grep Message-ID: <199601230156.RAA13283@freefall.freebsd.org> In-Reply-To: Your message of "Mon, 22 Jan 1996 17:31:37 PST." <199601230131.RAA11361@paris.CS.Berkeley.EDU>
next in thread | previous in thread | raw e-mail | index | archive | help
>> : I would like add options for recursive searching >> : (grep -R foo /usr/include). >> >> find /usr/local | xargs grep foo >> >> Why do we need another wart on grep? Especially when what you may >> want is find /usr/local -name \*f.h | xargs grep foo :-) >> >> Warner > >and why do we need an extra pipe, either? > > find /usr/include -name \*f.h -exec grep foo {} /dev/null \; Warner's example execs grep once (actually #files / xargs file limit). Your example execs grep for each file. Even though our pipe bandwidth isn't the best, I'd rather use a pipe then exec grep a bazillion time -- Justin T. Gibbs =========================================== FreeBSD: Turning PCs into workstations ===========================================
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199601230156.RAA13283>