public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Houder <houder@xs4all.nl>
To: cygwin@cygwin.com
Subject: Re: Possible issue with gawk 5.0.1-1: Getting new warnings
Date: Fri, 12 Jul 2019 10:48:00 -0000	[thread overview]
Message-ID: <efc25bf20057e107ae8fbce02dd91020@smtp-cloud9.xs4all.net> (raw)
In-Reply-To: <CAGtwZuYLXDHFiAHGVYw8s+jqt0bNtGMpy+6fOSiqjZddazXZew@mail.gmail.com>

Hi,

Apparently Corinna V. (the maintainer of gawk) is not available at the moment.

On Thu, 11 Jul 2019 11:51:09, Vipul P  wrote:
> 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
>   }'

?????

gsub(regexp, replacement[, target])

echo "This:is:a:colon:separated:line:%%%:" | awk '{
  gsub(/%/, "%25");
  gsub(/:/, "%3A");
  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

I am not surprised to see these specific warnings ...

See 3.2 (esacpe sequences) of GAWK: Effective AWK programming.

> -----
> This script runs without any warnings with older versions of gawk:
[snip]

    https://cygwin.com/ml/cygwin/2019-04/msg00095.html
    ( [ANNOUNCEMENT] gawk 5.0.0-1 )

Item 3

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

Using version 5 of gawk?

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

Not very likely, as Corinna V. uses the tarball provided by Arnold R.

Regards,
Henri


--
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

  reply	other threads:[~2019-07-12 10:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-11 18:51 Vipul P
2019-07-12 10:48 ` Houder [this message]
2019-07-12 14:43   ` Brian Inglis
2019-07-12 22:29 ` Steven Penny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=efc25bf20057e107ae8fbce02dd91020@smtp-cloud9.xs4all.net \
    --to=houder@xs4all.nl \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).