bug-grep
[Top][All Lists]
Advanced

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

Re: colors too much when pattern is dot


From: Mike Frysinger
Subject: Re: colors too much when pattern is dot
Date: Wed, 23 Apr 2008 23:01:29 -0400
User-agent: KMail/1.9.7

On Wednesday 23 April 2008, Mikel Ward wrote:
> With GREP_COLOR enabled, grep --color=auto colors the entire line when
> the pattern is "." or "^.".
>
> It's not a big problem, and maybe my understanding is wrong, but I
> would expect the . to match only the first character, and hence only
> the first character should be colored.

that isnt how grep works.  grep isnt line based like sed, so grepping for "." 
should match every character.

grepping for "^." however should only match the first character, but that 
seems to be fixed with 2.5.3, so ...
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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