Sujet : Re: One True AWK bug?
De : jeojet (at) *nospam* invalid.invalid
Groupes : comp.lang.awkDate : 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 projectpage and there is a patch available that provides a working fix which makesnawk 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