[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gawk bug - 'is equal' is faulty for string
From: |
Jérôme Jargot |
Subject: |
gawk bug - 'is equal' is faulty for string |
Date: |
Mon, 27 Jan 2020 14:28:55 +0100 |
Hello,
This is not the last gawk version and I think I must be mistaken because
the == is very likely not buggy for strings.
Still I do not understand my mistake, so I submit a bug report.
*TESTS: 'is equal' is faulty for string => 2 lines printed instead of 1*
# printf "'a', '7.1'\n'a', '7.2'\n'a', '7.3'\n'a', '7.10'\n" "" | LC_ALL=C
gawk --field-separator \' '$4==cversion {print}' cversion=7.10
'a', '7.1'
'a', '7.10'
# printf "'a', '7.1'\n'a', '7.2'\n'a', '7.3'\n'a', '7.10'\n" "" | LC_ALL=C
gawk --field-separator \' '$4==cversion {print}' cversion=7.1
'a', '7.1'
'a', '7.10'
*Linux*
# uname -a
Linux ip-172-31-6-179 4.15.0-1044-aws #46-Ubuntu SMP Thu Jul 4 13:38:28 UTC
2019 x86_64 x86_64 x86_64 GNU/Linux
root@ip-172-31-6-179:/usr/lib/cgi-bin/generateLicense
# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS"
*gawk version*# gawk --version
GNU Awk 4.1.4, API: 1.1 (GNU MPFR 4.0.1, GNU MP 6.1.2)
Copyright (C) 1989, 1991-2016 Free Software Foundation.
Best retgards,
Jerome