[NTLUG:Discuss] grep in subdirs
Steve Baker
sjbaker1 at airmail.net
Sun Jun 8 02:45:15 CDT 2003
David Camm wrote:
> user rgrep - that's what it was written for. see the man page.
...and just to prove that there's always *another* way...
grep abc `find . -name \*.xml -print`
(notice those are backwards quotes).
I prefer it over:
find . -name \*.xml -exec grep abc
...because it lists the filenames that match the pattern.
---------------------------- Steve Baker -------------------------
HomeEmail: <sjbaker1 at airmail.net> WorkEmail: <sjbaker at link.com>
HomePage : http://www.sjbaker.org
Projects : http://plib.sf.net http://tuxaqfh.sf.net
http://tuxkart.sf.net http://prettypoly.sf.net
-----BEGIN GEEK CODE BLOCK-----
GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++
-----END GEEK CODE BLOCK-----
More information about the Discuss
mailing list