[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug? using pattern matching with gawk
From: |
taha |
Subject: |
bug? using pattern matching with gawk |
Date: |
Wed, 4 Aug 2010 12:21:21 +0200 |
Hello,
I'm trying to replace all the "NULL" strings in the first columns of a file
by the string "NULLL" . I've read the documentation
before doing this, the documentation says that gawk will do an EXACT pattern
match for the value "NULL" and will replace it by "NULLL" OK.
The problem is, when I have a field in this column like 'abcdNULL', it will
be matched, and replaced by 'abdcNULLL', so it's not really an EXACT pattern
matching, but a partial one in this case.
Here's the typed command:
gawk '$1=="NULL"{$1="NULLL"}{print $0}' file
my gawk version: GNU Awk 3.1.8
uname -as : Linux 2.6.33.5-124.fc13.i686.PAE #1 SMP Fri Jun 11 09:42:24 UTC
2010 i686 i686 i386 GNU/Linux
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,
I hope that I was clear in my explanation, I'm looking forward to hearing
from you,
Regards,
--
taha
- bug? using pattern matching with gawk,
taha <=