|
From: | Jeff B |
Subject: | [bug-gawk] gawk bug: IGNORECASE=0 does not work |
Date: | Fri, 30 Jan 2015 03:00:23 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
Hi, gawk bug. Better just to show you than explain it up top here. I don't know if the bug affects anything else, eg other TRUE/FALSE variables or whatever. Thanks, Jeff Barry Acton, MA --------- # We compare 'a' to 'A' and get no match as expected. qbarry $?=0> gawk ' BEGIN { if ( "a" == "A" ) print "match"; else print "no match" }' no match # Same compare but now we set IGNORECASE to 1 so we get a match as expected. qbarry $?=0> gawk -v IGNORECASE=1 ' BEGIN { if ( "a" == "A" ) print "match"; else print "no match" }' match # We explicitly set IGNORECASE to *ZERO* and, huh? This should not match. qbarry $?=0> gawk -v IGNORECASE=0 ' BEGIN { if ( "a" == "A" ) print "match"; else print "no match" }' match ------- version info ------- qbarry $?=0> uname -a Linux atomik 3.10.17-smp #1 SMP Wed Oct 23 17:04:08 CDT 2013 i686 Intel(R) Atom(TM) CPU D510 @ 1.66GHz GenuineIntel GNU/Linux qbarry $?=0> cat /etc/slackware-version Slackware 14.1 I am up-to-date (2015-01-29) with all my Slackware patches. qbarry $?=0> gawk --version GNU Awk 4.1.0, API: 1.0 (GNU MPFR 3.1.2, GNU MP 5.1.3) Copyright (C) 1989, 1991-2013 Free Software Foundation. ... etc ... |
[Prev in Thread] | Current Thread | [Next in Thread] |