[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: |
Aharon Robbins |
Subject: |
Re: [bug-gawk] Change in behavior of gsub inside loop |
Date: |
Fri, 15 Jul 2011 15:30:56 +0300 |
User-agent: |
Heirloom mailx 12.4 7/29/08 |
Thanks for the bug report. I have checked in John's fixes to
the gawk-4.0-stable branch which will appear soon on Savannah.
Thanks,
Arnold
> Date: Mon, 11 Jul 2011 11:42:07 +0200
> From: Kacper Kornet <address@hidden>
> To: address@hidden
> Subject: [bug-gawk] Change in behavior of gsub inside loop
>
> 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
>
> Best regards,
> --
> Kacper