j***@invalid.invalid
2024-05-22 01:48:45 UTC
<snip>
I noticed in this one-liner if the conditional in the print statement
--
$ 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 projectI noticed in this one-liner if the conditional in the print statement
--
$ 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>
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