NetBSD-Bugs archive

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

Re: bin/53507: awk doesn't properly compare "numeric strings"



The following reply was made to PR bin/53507; it has been noted by GNATS.

From: Valery Ushakov <uwe%stderr.spb.ru@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/53507: awk doesn't properly compare "numeric strings"
Date: Wed, 8 Aug 2018 12:20:18 +0300

 On Wed, Aug 08, 2018 at 03:20:01 +0000, paul%whooppee.com@localhost wrote:
 
 > As an example,
 > 
 > 	awk 'BEGIN { max="10" ; for (i=0; i<max; i++) {print i}; exit}'
 >
 [uwe: fixed typo in example]
 > will only print the values 0 and 1, even though the assignment for max
 > seems to meet the definition of "numeric string" as contained in the
 > referenced man-page.
 
 Just a quick note that both mawk and gawk behave the same.
 
 -uwe
 


Home | Main Index | Thread Index | Old Index