I have a file that may contain incorrect formatting (in this case, the appearance of the \\backslash template). I would like to use grep to only return line numbers where this happens (as in, the match was here, go to line # x and fix it).
However, there seems to be no way to print the line number ( grep -n ), not a match or line.
I can use another regular expression to extract line numbers, but I want grep to not be able to do this myself. grep -no comes closer, I think, but still displays a match.
grep
Neil Aug 05 '11 at 15:33 2011-08-05 15:33
source share