On Mon, 2003-09-15 at 14:50, Jacob Fugal wrote:
> Ashley Oviatt wrote:
> > grep substr -H -r  *html
> 
> So is -H the same as -l? I use -l so it just tells me the file, rather 
> than the matching lines. If it is the same, and we ignore the subtelties 
> of the ., then what you've got is just like my:
> 
> grep -lr substr *html
> 
> The problem I have with that one is that the *html is expanded by the 
> shell before being passed to grep, so it is, in effect,
> 
> grep -lr substr file1.html file2_html file.3.html ...
> 
> So grep happily ignores subdir/ and all its contents since they weren't 
> specified as sources.

I dug this up in the man page:

grep -r --include=*html substr *

I tested it out, and it works beautifully.

Attachment: signature.asc
Description: This is a digitally signed message part

____________________
BYU Unix Users Group 
http://uug.byu.edu/ 
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to