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

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

Re: gawk bug with RS="^..."


From: Stepan Kasal
Subject: Re: gawk bug with RS="^..."
Date: Mon, 20 Dec 2004 11:38:34 +0100
User-agent: Mutt/1.4.1i

Hello,

On Mon, Dec 20, 2004 at 11:48:35AM +0200, Aharon Robbins wrote:
> >$ gawk 'BEGIN{RS="^Ax*\n"} END{print NR}' file
> >100
[...]
> Also, ignoring "correctness in weird cases" reasons, I don't see that this
> is a problem for people in practice.

you are right, of course.  I'd like to see it fixed, but it's not urgent at
all.

> > [...] RS matched the second line, [...] at the beginning of the buffer
> 
> That's not the case.  [...] It's more likely an issue
> that gawk isn't using whatever regex magic that says that the starting
> position is in the middle of a buffer so that ^ fails to match.

You are right, of course.  So the fix would be to set the flag as soon
as gawk moves from the beginning of the file.  Please cc it here if you
fix it.  (I might get to it, eventually.)

Thank you for clearing up my incomplete bug report.

Stepan Kasal




reply via email to

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