I would like to use the grep command to print a line number for the string I'm searching for. However, when I used the command
grep -n it prints the line number with a colon : next to it. Is there any way I can use the same
grep -n command to print a line number with it being followed by the : colon?
$ grep -n 'Captain' sometextfile.txt 3: Captain America
I would like it to instead print,
3 Captain America
(without the ':' )