Date: Sat, 15 Mar 2025 23:41:45 +0100 From: Steffen Nurpmeso <stef...@sdaoden.eu> Message-ID: <20250315224145.YPWRnxq7@steffen%sdaoden.eu>
| * Expands to the positional parameters, starting from one, | initially producing one field for each positional parameter that | is set. When the expansion occurs in a context where field | splitting will be performed, any empty fields may be discarded | and each of the non-empty fields shall be further split as | described in Section 2.6.5. | | By the very meaning of this the fields are split individually, *first* In effect perhaps, but POSIX never specifies the implementation details. As long as the implementation produces something within what POSIX expects, how that happens is irrelevant. | This is exactly what i do. That's fine, and, here at least, the only person worried about what you're doing potentially being wrong, is you. If you want to match bash exactly, then that's what you need to do, regardless of whether bash is correct or not. If complying with POSIX is the aim (pretending you're a shell for a minute) then there is a bunch of latitude in this area. Note, there is (and was) no claim that the mksh results I showed in an earlier message were incorrect, those are within spec too - just different (other shells do the same, mostly ksh variants, but also yash). kre