[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] Change in behavior of gsub inside loop
From: |
j . eh |
Subject: |
Re: [bug-gawk] Change in behavior of gsub inside loop |
Date: |
Thu, 14 Jul 2011 05:55:32 -0500 |
User-agent: |
Mutt/1.4.2.2i |
On Mon, Jul 11, 2011 at 11:42:07AM +0200, Kacper Kornet wrote:
> Hi,
>
> I have observed the following changed behavior between gawk-3.8.1 and
> gakw-4.0.0. While in the former
>
> echo -ne ' aaa' | gawk '{for (c = 1; c <= NF; c++) {gsub("foo", "bar", $c);
> print}}'
>
> prints:
>
> aaa
>
> the gawk-4.0.0 does not preserve the leading spaces and prints:
>
> aaa
Thanks for the report. This is indeed a bug. The attached patch
fixes the problem.
Thanks.
John
gsub_fix.diff
Description: Text document