grep recursively for a specific file type in Linux terminal -


can search term (eg. "onblur") recursively in folders in specific files (html files)?

grep -rin "onblur" *.html 

this returns nothing. but,

grep -rin "onblur" . 

returns "onblur" search result available files, in text(".txt"), .mako, .jinja etc.

consider checking this answer , that one.

also might you: grep file types recursively | commandlinefu.com.

the command is:

grep -r --include="*.[ch]" pattern . 

and in case is:

grep -r --include="*.html" "onblur" . 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -