bug-gawk
[Top][All Lists]
Advanced

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

[bug-gawk] Change in behavior of gsub inside loop


From: Kacper Kornet
Subject: [bug-gawk] Change in behavior of gsub inside loop
Date: Mon, 11 Jul 2011 11:42:07 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

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



reply via email to

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