grep output to show only matching file

Viewed 133714

What is the option for grep that will allow me only to print the matching file and not the line within a file that matches the criteria?

4 Answers

Also remember one thing. Very important
You have to specify the command something like this to be more precise
grep -l "pattern" *

Related