A NOTE has been added to this issue. ====================================================================== https://www.austingroupbugs.net/view.php?id=1778 ====================================================================== Reported By: kre Assigned To: ====================================================================== Project: Issue 8 drafts Issue ID: 1778 Category: Shell and Utilities Type: Enhancement Request Severity: Objection Priority: normal Status: New Name: Robert Elz Organization: User Reference: Section: XCU 3/read Page Number: 3291-3294 Line Number: 111869-111878, 111961-111963, 11946, 11979-11980 Final Accepted Text: ====================================================================== Date Submitted: 2023-10-02 13:58 UTC Last Modified: 2023-10-03 11:59 UTC ====================================================================== Summary: The read utility needs field splitting updates/corrections )and a little more) ====================================================================== Relationships ID Summary ---------------------------------------------------------------------- related to 0001649 Field splitting is woefully under speci... ======================================================================
---------------------------------------------------------------------- (0006510) kre (reporter) - 2023-10-03 11:59 https://www.austingroupbugs.net/view.php?id=1778#c6510 ---------------------------------------------------------------------- Re https://www.austingroupbugs.net/view.php?id=1778#c6509 Could you quote the text which you believe clearly requires that, as I see nothing at all about the order in which the assignments take place. The current version does say: the first field shall be assigned to the first variable var, the second field to the second variable var, and so on. but that doesn't say anything about the order in which those assignments are to occur. Just which field goes to which variable. Further it also says: If there are fewer fields than there are var operands, the remaining vars shall be set to empty strings. but that says nothing about the order in which that occurs relative to the other assignments. One reasonable implementation might be to simply start by setting all the vars to empty strings, and then update those for which there is data from the read result. Nothing here says that cannot be done. While I'm here, the current text also doesn't say what to do if there's an error making one of those assignments - certainly read exits with a status > 1 in that case, that's clear, but is read expected to go ahead and assign to the other variables, or may it abort processing as soon as the error is detected? That's unstated as well as best I can tell. As a hint: not all shells do the same thing here, there are actually 3 different behaviours I have detected. Further not all shells do the >1 exit status either, some exit 1 in this case (for some the shell (or subshell) exits (treating this as a variable assignment error and doing as specified by table 2.8.1 I presume). Issue History Date Modified Username Field Change ====================================================================== 2023-10-02 13:58 kre New Issue 2023-10-02 13:58 kre Name => Robert Elz 2023-10-02 13:58 kre Section => XCU 3/read 2023-10-02 13:58 kre Page Number => 3291-3294 2023-10-02 13:58 kre Line Number => 111869-111878, 111961-111963, 11946, 11979-11980 2023-10-02 14:00 kre Note Added: 0006500 2023-10-02 14:02 kre Note Edited: 0006500 2023-10-02 14:20 kre Note Added: 0006502 2023-10-02 14:22 kre Note Edited: 0006502 2023-10-02 14:24 kre Note Edited: 0006502 2023-10-02 14:30 kre Note Added: 0006503 2023-10-02 14:33 kre Note Edited: 0006502 2023-10-02 14:34 kre Note Edited: 0006502 2023-10-02 14:44 kre Note Edited: 0006500 2023-10-02 16:18 geoffclare Project 1003.1(2013)/Issue7+TC1 => Issue 8 drafts 2023-10-02 16:19 geoffclare version => Draft 3 2023-10-02 16:20 geoffclare Note Added: 0006507 2023-10-02 16:21 geoffclare Relationship added related to 0001649 2023-10-03 09:23 geoffclare Note Added: 0006509 2023-10-03 11:59 kre Note Added: 0006510 ======================================================================