When I want to grep all the html files in some directory, I do the following
grep --include=\"*.html\" pattern -R /some/path
which works well. T
Use grep with find command
grep
find
find /some/path -name '*.html' -o -name '*.htm' -o -name '*.php' -type f -exec grep PATTERN {} \+
You can use -regex and -regextype options too.
-regex
-regextype