[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Assigning to NF
From: |
Dave B |
Subject: |
Re: Assigning to NF |
Date: |
Mon, 23 Mar 2009 12:15:55 +0100 |
User-agent: |
Thunderbird 2.0.0.19 (X11/20090114) |
Aharon Robbins wrote:
> Thanks for the note. To add more fields, POSIX says just increase NF
> to the desired value. The record is then rebuilt automatically the
> next time it's referenced; the $1 = $1 isn't necessary.
Can you please provide a reference for that? I found nothing in the new
POSIX specs. The closest thing I've found (but which describes a different
thing), is this:
"References to nonexistent fields (that is, fields after $NF), shall
evaluate to the uninitialized value. Such references shall not create new
fields. However, assigning to a nonexistent field (for example, $(NF+2)=5)
shall increase the value of NF; create any intervening fields with the
uninitialized value; and cause the value of $0 to be recomputed, with the
fields being separated by the value of OFS."
It seems to me that what you said cannot be deduced as a consequence of the
above text.
Thank you!
--
D.