[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug? using pattern matching with gawk
From: |
Rita Bylsma |
Subject: |
Re: bug? using pattern matching with gawk |
Date: |
Wed, 4 Aug 2010 17:05:33 +0200 |
On Wed, 4 Aug 2010 12:21:21 +0200
taha <address@hidden> wrote:
> Please tell me if it's a bug, or a bug in the documentation, or if
> it's simply something that I don't understand,
Hi Taha,
Apart from that you should not use the word 'matching' for string
comparison, you understood correctly. I tried your code and it worked
as you expected on the same version of Gawk:
GNU Awk 3.1.8
uname -as:
Linux 2.6.34-ARCH #1 SMP PREEMPT Mon Jul 5 21:03:38 UTC 2010
i686 GNU/Linux
I can not think of any cause for the error you encountered, but
you might check:
1) Whether your input lines do not start and end were you think
they do. This can happen with files from M$ and Mac. Gawk
on Linux will expect \n line-ends, and no \r.
2) Whether the encoding of the input file is different from that of
the code. I have had some problems with that in the past,
although that was with real pattern matching, not string
comparison.
3) What localization is being inherited from you shell.
Regards,
Rita