bug-gnu-utils
[Top][All Lists]
Advanced

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

GAWK Bug Report


From: Peter Graglia
Subject: GAWK Bug Report
Date: Thu, 20 Dec 2007 12:36:26 -0800 (PST)

Hello,
I wish to report a problem I am experiencing with GAWK
version 3.1.5. It incorrectly handles the regular
expression character set, [a-z], by matching both
lower case and upper case letters.  This works
properly with GAWK 3.0.3 (Windows) and in the original
AWK as shown below.

My operating system per the uname command:
Linux lumina 2.6.22-14-generic #1 SMP Sun Oct 14
23:05:12 GMT 2007 i686 GNU/Linux

AWK script file:
# abc.awk
/^[a-z]/ { print NR ": " $0 " Starts with lowercase."
}

Contents of data file, abc.data:
ABC
Abc
aBC
abc

Output GAWK (incorrect):
$ gawk -f abc.awk abc.data
1: ABC Starts with lowercase.
2: Abc Starts with lowercase.
3: aBC Starts with lowercase.
4: abc Starts with lowercase.

Output Original AWK (correct):
$ awk -f abc.awk abc.data
3: aBC Starts with lowercase.
4: abc Starts with lowercase.

I have known about AWK for years, but never bothered
to learn it.  A coworker recently helped me out of a
difficult spot with a little AWK magic and now I am
hooked.  

Please let me know if there is any other information
that would be helpful.

Best regards,
Peter Graglia




      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 





reply via email to

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