NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: standards/44063: awk: setting NF doesn't affect $<fieldnum>
> So I think this is a good change regardless of whether the standard
> really demands it...
>
> I'd say there there is one open question, which is whether
>
> % echo 1 2 3 | awk '{ NF=2; NF=3; print; }'
>
> should print "1 2" or "1 2 3", IOW, whether assiging NF destroys or
> merely hides subsequent values. That one i could argue either way...
GNU awk and mawk destroy them. This is why
I implemented assigning NF this way.
--
Best regards, Aleksey Cheusov.
Home |
Main Index |
Thread Index |
Old Index