bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: odd bug in grep


From: Stepan Kasal
Subject: Re: odd bug in grep
Date: Thu, 21 Nov 2002 10:39:36 +0100
User-agent: Mutt/1.2.5.1i

Hello,

On Wed, Nov 20, 2002 at 02:15:22PM -0500, Andrew Saunders wrote:
> Here is an small bug I found in grep/more. While using this command
> 
> grep -irP --color=always "(cgi|\.pl|data1|sql|https)" * | grep
> "^[^(logs|Binary\sfile|webalizer|html\/logs)]"|more
> 
> One of the lines ended on the .pl, and was colored red. The --MORE-- was
> also colored in the red when this happened. The next couples lines after
> continuing, outside of the grep selection, were also colored red.

Please report also versions of the programs involved: grep, more, and
pc_re library (implements Perl-compatible regexps, used by grep -P).

Please mail the output of the following commands:

grep --version
more --version
rpm -qf `which more`;rpm -q pc_re pc_re-devel  # in case you use RedHat

In case you want to help more with tracking it down, the following might
help:

It seems as if the control sequence for color change was misplaced or
misinterpreted.

To see which of the above possibilities has happened, you can save the
output of "grep -irP --color=always" and look whether the command to
return back to normal color ("\33[00m", \33 represents escape) is always
at the same line as the start of the color (eg. "\33[01;31m").

If you catch a case where the end-color tag is missing or not on the
same line as the start-color tag, the problem is on grep's side.

If the problem disapears when using "grep -E" instead of "grep -P",
the problem is most likely in the pc_re library.

BTW: the second ``grep'' command in your pipe looks a bit suspicious:
1) the square brackets are should probably not be there
2) there should be -P somewhere, shouldn't it?  I guess that ``\s''
is Perl-specific, but I'm not sure.

> I know this is a insignificant bug, but there you go.

If you don't mind helping with tracking it down, you're welcome.
Without your help, it's not likely to be fixed, I'm afraid.

Thank you for filing the bug report.

Regards,
        Stepan Kasal




reply via email to

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