grep  do not want image files

rgb192
rgb192 used Ask the Experts™
on
grep -R 'search term' .

I am getting 'binary results'

I do not want images
want php, tpl
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2007
Commented:
try

grep -R 'search term' *.php *.tpl
Most Valuable Expert 2013
Top Expert 2013
Commented:
grep -R 'seach term' --include="*.php" --include="*.tpl" .
Try:
grep -R 'search' | grep -v "Binary"

First part is the same as what you're doing currently; and the second part excludes the lines containing "Binary". Since the first command's output is piped to the second, you'll get only the required results.

Hope that helps :)

Author

Commented:
Alll work

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial