The following issue has been SUBMITTED. ====================================================================== https://www.austingroupbugs.net/view.php?id=1821 ====================================================================== Reported By: mortoneccc Assigned To: ====================================================================== Project: 1003.1(2016/18)/Issue7+TC2 Issue ID: 1821 Category: Shell and Utilities Type: Enhancement Request Severity: Comment Priority: normal Status: New Name: Ed Morton Organization: User Reference: Section: awk Page Number: 0 Line Number: 0 Interp Status: --- Final Accepted Text: ====================================================================== Date Submitted: 2024-03-14 11:42 UTC Last Modified: 2024-03-14 11:42 UTC ====================================================================== Summary: Define the values of $0, $1, etc. in the END section Description: The value of NF, i.e. the number of fields read, in the END section is defined in the standard as: --- Inside an END action, NF shall retain the value it had for the last record read --- but the value of $0, $1, and the other fields is not defined. Most modern awks will have them retain the value of the last record read, just like NF, but it is currently undefined behavior which seems like it's a simple omission from the spec. Desired Action: Update the spec to say: --- Inside an END action, $0, $1, and the other fields shall retain the values they had for the last record read --- ======================================================================
Issue History Date Modified Username Field Change ====================================================================== 2024-03-14 11:42 mortoneccc New Issue 2024-03-14 11:42 mortoneccc Name => Ed Morton 2024-03-14 11:42 mortoneccc Section => awk 2024-03-14 11:42 mortoneccc Page Number => 0 2024-03-14 11:42 mortoneccc Line Number => 0 ======================================================================