A NOTE has been added to this issue. ====================================================================== https://www.austingroupbugs.net/view.php?id=1778 ====================================================================== Reported By: kre Assigned To: ====================================================================== Project: 1003.1(2013)/Issue7+TC1 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 Interp Status: --- Final Accepted Text: ====================================================================== Date Submitted: 2023-10-02 13:58 UTC Last Modified: 2023-10-02 14:20 UTC ====================================================================== Summary: The read utility needs field splitting updates/corrections )and a little more) ======================================================================
---------------------------------------------------------------------- (0006502) kre (reporter) - 2023-10-02 14:20 https://www.austingroupbugs.net/view.php?id=1778#c6502 ---------------------------------------------------------------------- Re Note: 0006498 (a note added to bug:1649), where it says: Where IFS=: read -r header rest fails to read the "rest" properly if it contains one and only one ":" and it's at the end of the line. I'm afraid I don't understand the perceived problem. What is meant there. If I have the following script (which is a bit more general than it needs to be for this, as it was a modified version of another script I used for testing just how shells process read(1)): I= case "" in -i*) I=; shift;; -I) I=unset; shift;; esac printf %s\n "" | { case "" in unset) unset IFS;; *) IFS="";; esac read -r var rest && printf %s\n var="[unset] rest=[unset]" } and I call it /tmp/r2 and run it as /usr/pkg/bin/bash /tmp/r2 -i: line: then every shell I tested produces: var=[line] rest=[] as the result. I'm not sure what different you'd be expecting there. Here "every shell" includes zsh, even when not in --emulate sh mode, and NetBSD's crappy ancient pkksh implementation. That is, apart from ksh88, which I don't have, just about every currently used Bourne shell derivative which is still in active use. 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 ======================================================================