bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#28081: way to change line number separator from colon to space?


From: Bruce Dubbs
Subject: bug#28081: way to change line number separator from colon to space?
Date: Sun, 13 Aug 2017 13:42:40 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0 SeaMonkey/2.39

Marcel Partap wrote:
Hi,
is there any way to make grep place a space before and after the line number 
instead of a colon?
*./src/ui_download_manager.cc:36:namespace cwidget
With many terminals not including the : as a word separator SHIFT+double click 
on the filename selects
filename:line:
so one has to manually select the filename. So much unneccessary work 😁

One way:

grep <arguments> | sed "s/:/ /"

You could easily create a script to automatically do that. It wouldn't handle the case where a colon is a part of the file name, but that's pretty rare.

  -- Bruce







reply via email to

[Prev in Thread] Current Thread [Next in Thread]