delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/07/12/06:49:07

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:message-id:from:reply-to:to:subject
:references:in-reply-to:content-type; q=dns; s=default; b=xfauXN
i6PaZqpc9YxChIAElvPABpf6BBaCwSYjeZqgU7S0ZcsFM08vG6u9BiPRBHrLJULB
bEBrwOamGOUp+03JHnvPun/y52cjzzwIJ7O9UyAgOE/4qq7hsYdMyaeKATV38r2K
0a7HQUzy+q1l7Zk73fqhpt5pO7v8pcins3Fuw=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:message-id:from:reply-to:to:subject
:references:in-reply-to:content-type; s=default; bh=tue2+tUJeHuA
BdJZ1pLhkpRS+uY=; b=C4hjfI00Yw7WsytgzHISrqOmoOm4Ia7YpRovrHt6Lt+L
6u10sofA3Db+0+Wk8+pUmnFr7gsPXyZrUO5vJkmlD8t4eKVpEc+ttFbKjoKI164A
j+2UUcI0K17inwOcglHnFH+SdE8QTcFZ8LirJIWwTHzwGxGKLk+dDmYvbDv+YkQ=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-4.8 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=H*F:D*nl, arnold, ANNOUNCEMENT, Arnold
X-HELO: lb2-smtp-cloud9.xs4all.net
Date: Fri, 12 Jul 2019 12:47:59 +0200
Message-ID: <efc25bf20057e107ae8fbce02dd91020@smtp-cloud9.xs4all.net>
From: Houder <houder AT xs4all DOT nl>
Reply-To: cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
Subject: Re: Possible issue with gawk 5.0.1-1: Getting new warnings
References: <CAGtwZuYLXDHFiAHGVYw8s+jqt0bNtGMpy+6fOSiqjZddazXZew AT mail DOT gmail DOT com>
In-Reply-to: <CAGtwZuYLXDHFiAHGVYw8s+jqt0bNtGMpy+6fOSiqjZddazXZew@mail.gmail.com>
User-Agent: mua.awk 0.99

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019