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.
Sweet, that's what I was looking for. I'd brought the man page up several times, but my sanity wouldn't let me read it start to finish, and I guess I couldn't find the right search string to stumble across it. Thanks.
Jacob
____________________
BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
