bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] [bug report] gawk doesn???t work correctly when assign sp


From: Aharon Robbins
Subject: Re: [bug-gawk] [bug report] gawk doesn???t work correctly when assign special value to variable
Date: Fri, 07 Aug 2015 14:34:44 +0300
User-agent: Heirloom mailx 12.5 6/20/10

Hi.

> Date: Thu, 6 Aug 2015 15:55:50 +0800
> From: Li Chao <address@hidden>
> To: address@hidden
> Subject: [bug-gawk] [bug report] gawk doesn???t work correctly when assign 
> special value to variable
>
> 2) Prepare a test file
> cat > 1.txt << EOF
> 00e1 00e1
> 00e2 00e4
> 00e3 00e1_01
> EOF
>
> 3) Execute following command to see the result
> [root]# gawk -v var="00e1" '$2==var' 1.txt
> 00e1 00e1
> 00e2 00e4
>
> The second line should not be there. Because "00e4" is NOT equal to "00e1"
> obviously.

They are equal numerically, and that is the kind of comparison
gawk does on that data. See the link that Andy gave you.

Also note that something like  00e1_01   isn't any kind of number
that gawk knows about. The manual discusses the form of floating point
constants.

Arnold



reply via email to

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