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

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

bug introduced in gawk 3.1.1, still in 3.1.3


From: Bill Bruno
Subject: bug introduced in gawk 3.1.1, still in 3.1.3
Date: Wed, 28 Jan 2004 16:23:30 -0700 (MST)

Here's the bug:

cpg[95]% ./gawk '{sub(/[a-z]/,"&"); print}'
aaa
&aa

I get this in 3.1.1 and 3.1.3.  In 3.1.0 I get the correct
behavior:

motif[5]% gawk '{sub ( /[a-z]/, "&"); print}'
aaa
aaa

I find the same problem in gsub, where it is more relevant
because this command can be used to count occurences of
a regexp without changing the string.  If there is a more
standard way to do that, please tell me.

I guess the work around is to duplicate the string first...
Bill




reply via email to

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