[NTLUG:Discuss] grep in subdirs
Richard Strittmatter
richard at mesh.net
Sun Jun 8 08:52:15 CDT 2003
and *another way*
find . -name \*.xml | xargs grep abc
On Sun, 8 Jun 2003, Steve Baker wrote:
> 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-----
>
>
> _______________________________________________
> https://ntlug.org/mailman/listinfo/discuss
>
More information about the Discuss
mailing list