[NTLUG:Discuss] grep in subdirs
Jerry Haltom
wasabi at larvalstage.net
Sat Jun 7 21:32:12 CDT 2003
Incorrect reason.
They do not work, because the man page says -r only works for EVERY file
in all matching DIRECTORIES. *.xml matches no directories.
On Sat, 2003-06-07 at 14:48, Victor Brilon wrote:
> Both of those won't work because the *.xml wildcard notation isn't
> passed by the shell to the recursive processes.
>
> Try something like this:
>
> find dir1 dir2 -name '*.xml' -exec grep -i 'abc' {} /dev/null \;
>
> Victor
>
> Pervaz Allaudin wrote:
> > OK a basic question.
> >
> > I am trying to do a grep in xml files and I want it to do all the subdirs.
> >
> > I tried :
> >
> > grep -r -i abc *.xml
> > grep -d recurse abc *.xml
> > and various other combinations.
> >
> > but it does not work and I cannot figure out why.
> >
> > Any ideas.
> >
> > Pervaz
> >
> >
> >
> > _______________________________________________
> > https://ntlug.org/mailman/listinfo/discuss
> >
> >
>
>
> _______________________________________________
> https://ntlug.org/mailman/listinfo/discuss
More information about the Discuss
mailing list