if you are using GNU grep, -H option gets enabled by default when there are multiple input files
Hopefully only when stdout isatty().
Edit: Nope, writes l̶i̶n̶e̶ ̶n̶u̶m̶b̶e̶r̶s̶ file names to output regardless. Boo.
Edit: Nope, writes l̶i̶n̶e̶ ̶n̶u̶m̶b̶e̶r̶s̶ file names to output regardless. Boo.
Is also useful, as it prints the filename and the matching lines.