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

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

Re: grep 2.5: --only for long line runs forever


From: Stepan Kasal
Subject: Re: grep 2.5: --only for long line runs forever
Date: Mon, 20 Jan 2003 11:25:21 +0100
User-agent: Mutt/1.2.5.1i

Hello,

On Sun, Jan 19, 2003 at 01:45:45PM +0100, Sven Hartrumpf wrote:
> I get the reported behavior for the following file:
> http://ki220.fernuni-hagen.de/hartrumpf/buggrep-a
> grep --only "analysis-quality" buggrep-a

I tried to reproduce the problem but with no success.  As grep uses the
system C library's regex, the bug may actually be there.
(This may improve in future releases, as grep might have more
requirements to the system library before it decides to use it;
in all other cases, a copy distributed with grep would be used.)


As far as alternative solutions are concerned, a convenient way might be
the following:

        gawk '{match($0,/analysis-quality ([^)]*)\)/,a);print a[1]}'

both have been tested with GNU awk 3.1.0 and 3.1.1; older versions may
cause problems.

Or you can use tr, perhaps

        tr '(' '\n'

to have all '(' transformed to newlines.  The result will have reasonably
short lines.

HTH,
        Stepan Kasal




reply via email to

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