Re: One True AWK bug?

Liste des Groupes 
Sujet : Re: One True AWK bug?
De : jeojet (at) *nospam* invalid.invalid
Groupes : comp.lang.awk
Date : 22. May 2024, 02:48:45
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v2jitt$rp23$1@dont-email.me>
<snip>
I noticed in this one-liner if the conditional in the print statement
below lacks parentheses it produces and "illegal statement" error:
>
--
$ printf 'foo\n\nbar\n' |nawk '{print $0 != "" ? $0 : "[blank]"}'
nawk: syntax error at source line 1
context is
       {print $0 >>>  != <<<
nawk: illegal statement at source line 1
nawk: illegal statement at source line 1
--
<snip>

Just a followup: this got submitted as a open issue (#233) on the project
page and there is a patch available that provides a working fix which makes
nawk match mawk and gawk.

Appologies for the original post; I wasn't aware that it's more or less
the gawk project folks maintaining The One True Awk code and I know not
to post gawk bugs here.

-j

Date Sujet#  Auteur
22 May 24 * Re: One True AWK bug?2jeojet
22 May 24 `- No apology needed - your post is fine (Was: One True AWK bug?)1Kenny McCormack

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal