How do you grep and only return the matching line? i.e. The path/filename is omitted from the results.
In this case I want to look in all .bar files in the current directory, searching for the term FOO
find . -name '*.bar' -exec grep -Hn FOO {} ;
See Question&Answers more detail:os