grep --include='FILEPATTERN' -rin SEARCHPATTERN *

Where:
FILEPATTERN is the file name pattern you want to match, for example 'h*' for all files that start with h
-r is recursive
i is ignore case for SEARCHPATTERN matching
n is print out the line number
SEARCHPATTERN is what you want to search
* is to include all files (which is usually what you use if you use --include)
Trackback URL
Leave your own comments about this post:
You must be logged in to post a comment.