[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] Count empty line as a column with one empty field
From: |
Davide Brini |
Subject: |
Re: [bug-gawk] Count empty line as a column with one empty field |
Date: |
Tue, 25 Sep 2018 17:07:55 +0200 |
On Tue, 25 Sep 2018 09:47:09 -0500, Peng Yu <address@hidden> wrote:
> I am not saying it is a bug, either.
>
> A row with an empty field, instead of an empty row, is just another
> way to interpret in the input. Both are fine depending on the context.
> In certain cases, the former may be preferred over the latter.
$ printf '%s\n' a '' b | awk '!NF{$1=""} {print NF}'
1
1
1
--
D.