[NTLUG:Discuss] grep in subdirs
Victor Brilon
victor at vail.net
Sat Jun 7 14:48:18 CDT 2003
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
>
>
More information about the Discuss
mailing list