2
1
find . -name "*.java" -exec grep "foo" {} \;
This just prints matches, no file name.
find . -name "*.java" -exec grep "foo" /dev/null {} \;
But this prints file name as well.
Why? What are the mechanics of find/grep that cause file name to print when /dev/null is inserted into the mix?
PS - yes, I know I can do "grep -H"