bug-gawk
[Top][All Lists]
Advanced

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

RE: bug in AWK


From: Evgeny Smirnov
Subject: RE: bug in AWK
Date: Fri, 13 Aug 2021 23:31:34 +0300

$ awk -V

GNU Awk 5.1.0

 



Best regards,
Evgeny Smirnov




 

From: Evgeny Smirnov [mailto:evgeny.p.smirnov@mail.ru] 
Sent: Friday, August 13, 2021 11:30 PM
To: 'bug-gawk@gnu.org' <bug-gawk@gnu.org>
Subject: bug in AWK

 

Hello dear Sir or Madam,

 

It seems I’ve found a bug in awk.

 

The output is wrong depending on input data:

 

$ awk -f script.awk data.txt

2016-09-04 20:14:29,20

2016-09-04 19:14:29,19

2016-09-04 20:14:29,19

 

/* here 20 should be instead of last 19 */

 

script.awk:

BEGIN{

OFS=","

}

{

"date -d \""$0"\" +%H" | getline d

print $0, d

}

 

data.txt:

2016-09-04 20:14:29

2016-09-04 19:14:29

2016-09-04 20:14:29

Best regards,
Evgeny Smirnov



 



reply via email to

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