Possible issue with gawk 5.0.1-1: Getting new warnings

Vipul P vipul.voip2@gmail.com
Thu Jul 11 18:51:00 GMT 2019


Hello,

Here is a sample script to invoke awk:

$ cat ./gawk_error.sh
#!/bin/sh
echo "This:is:a:colon:separated:line:%%%:" | awk '{
  gsub("\\%", "%25", $0);
  gsub("\\:", "%3A", $0);
  print
  }'
----

If I invoke it with gawk 5.0.1-1, I see warnings as below:

$ uname -a
CYGWIN_NT-10.0 MyPC 3.0.7(0.338/5/3) 2019-04-30 18:08 x86_64 Cygwin

$ awk -V
GNU Awk 5.0.1, API: 2.0 (GNU MPFR 4.0.2, GNU MP 6.1.2)
Copyright (C) 1989, 1991-2019 Free Software Foundation.
...

$ ./gawk_error.sh
awk: cmd. line:2: (FILENAME=- FNR=1) warning: regexp escape sequence `\%'
is not a known regexp operator
awk: cmd. line:3: (FILENAME=- FNR=1) warning: regexp escape sequence `\:'
is not a known regexp operator
This%3Ais%3Aa%3Acolon%3Aseparated%3Aline%3A%25%25%25%3A

-----
This script runs without any warnings with older versions of gawk:

$ awk -V
GNU Awk 4.2.1, API: 2.0 (GNU MPFR 4.0.1, GNU MP 6.1.2)
Copyright (C) 1989, 1991-2018 Free Software Foundation.
...

$ ./gawk_error.sh
This%3Ais%3Aa%3Acolon%3Aseparated%3Aline%3A%25%25%25%3A

----

The script runs without any warnings on Linux and other Unix variants.

Is this a regression in gawk 5.0.1-1 on Cygwin ?

Thanks in advance.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list