Menu

#171 gawk fails if IGNORECASE or on [sets]

Gawk
closed
GnuWin
Binaries (396)
5
2012-07-26
2004-08-12
Eric Pement
No

GnuWin32 gawk (2004-06-02 09:08, 306,688 bytes) ignores case if using a "/pattern/" with a [characterset], and programs with abnormal termination if the gawk variable IGNORECASE is properly set.

Screen dump displays comparison with UnxUtils gawk, a same version level:

--BEGIN CONSOLE DUMP---

[C:]c:\UnxUtils\gawk.exe --version | head -4
GNU Awk 3.1.3
Copyright (C) 1989, 1991-2003 Free Software Foundation.

This program is free software; you can redistribute it and/or modify

[C:]c:\bin\GnuWin32\bin\gawk.exe --version | head -4
GNU Awk 3.1.3
Copyright (C) 1989, 1991-2003 Free Software Foundation.

This program is free software; you can redistribute it and/or modify

[C:]echo FOO | c:\UnxUtils\gawk "/^[a-z]/"

[C:]echo FOO | c:\UnxUtils\gawk "BEGIN{IGNORECASE = 1}; /^[a-z]/"
FOO

[C:]echo FOO | c:\bin\GnuWin32\bin\gawk.exe "/^[a-z]/"
FOO

[C:]echo FOO | c:\bin\GnuWin32\bin\gawk.exe "BEGIN{IGNORECASE = 1}; /^[a-z]/"
gawk: cmd. line:1: (FILENAME=- FNR=1) fatal error: internal error

abnormal program termination

[C:]dir c:\bin\GnuWin32\bin\gawk.exe /hkm
6/02/2004 9:08 306,688 gawk.exe

[C:]md5sum c:\bin\GnuWin32\bin\gawk.exe
\151faca0640120c7fb10bae1561ec836 *c:\bin\GnuWin32\bin\gawk.exe

---END CONSOLE DUMP-----

The GnuWin32 version of gawk should not have printed "FOO" in the command above, and should support the gawk variable IGNORECASE.

Reported by Eric Pement - eric.pement [at] moody.edu

Discussion

  • GnuWin

    GnuWin - 2004-08-12

    Logged In: YES
    user_id=217802

    This bug report is accepted as valid and will be fixed in an
    upcoming release.

     
  • George Schubert

    George Schubert - 2007-10-26

    Logged In: YES
    user_id=1889025
    Originator: NO

    Eric-
    Thank you so much for posting this. I've been working for weeks trying to nail down this elusive, erratic problem. My awk scripts would work fine on Win2Kpro, most of the time; hardly every work completely on XP. I was getting the same error message as you and an exit code of 3. When I commented out the IGNORECASE=1, my scripts became robust again on both of these operating systems. Thank you again!!!
    -George Schubert

     
  • GnuWin

    GnuWin - 2007-12-29

    Logged In: YES
    user_id=217802
    Originator: NO

    This bug has been fixed. A new release is available through
    http://gnuwin32.sourceforge.net/

     
Auth0 Logo