SyntaxFix
Write A Post
Hire A Developer
Questions
Try this little trick to coax grep into thinking it is dealing with multiple files, so that it displays the filename:
grep
grep 'pattern' file /dev/null
To also get the line number:
grep -n 'pattern' file /dev/null