When searching on multiple files, the output of grep looks something like this:
{FILE}:{MATCH}
This is a problem since if I double-click on the {FILE}
portion, I will at least also select (and copy) the :
and possibly some of the match. How can I get grep to instead format its output something like this:
{FILE} : {MATCH}
Basically, I want to insert a space before the column. (and optionally one after)
Best Answer
grep -T
will work 7/8ths of the time.From the GNU grep manual: