Robert Elz wrote in
 <21988.1742085...@jacaranda.noi.kre.to>:
 |    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.

But, dear Robert.  The problem is not an empty field.  The problem
is that ":a:" has to be splitted to ""+a by itself, not to
""+a+"", as the second : only delimits the "a".

 |
 || 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

And NetBSD sh, and ksh in that regard, yes.  And this is decade
old behaviour, at least two, likely even longer.

 |do, regardless of whether bash is correct or not.  If complying

I am afraid so, yes.  But say, isn't ksh88 the template for POSIX,
and if so, is the above standard saying now ksh88 and all the
shells deviate, or is the above one of those not "sooo" seldom
occasions where application behaviour was not hundred percent
correctly taken over to the initial standard document?  In the
latter case there should be an issue.

 |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).

This was, if i recall correctly, about the "empty fields *may* be
discarded".  (I do no longer have mksh around or track it.  It,
.. it reliably failed to run a script with enabled monitor mode,
different to all other shells, but Thorsten was not willing to
look into it; 'been some years; that "zombie" message was around
by then already, though -- i recall you mentioned it once
yourself.)  And that is not the issue here.

 --End of <21988.1742085...@jacaranda.noi.kre.to>

Greetings to Thailand, dear Robert.  Here is deep in the night,
but at least real Spring is only three to four days ahead!!

Ciao from Germany,

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

Reply via email to