Re: your $(#…) bugreport

mirabilos <[email protected]> Tue, 3 Feb 2026 14:32:59 +0100 (CET)
Newsgroups org.kernel.vger.dash
Message-ID <[email protected]>
Hi Jari,

>Ouch, too bad POSIX didn't define them to be exact equivalents.

the idea was, perhaps, that $(=E2=80=A6) was supposed to be an improvement
over the previous accent-gravis-style which had known problems and
incompatibilities. (Some of these are also documented in the GNU
autoconf texinfo page, section Portable Shell, which I recommend,
it=E2=80=99s a good read.)

>From user's perspective, I wou=C3=B6d have expected the statements to
>exhibit the same behavior.

The difference here is: the accent-gravis style merely searches
for the matching one, the POSIX style does a full recursive parsing
to allow for parenthes=C4=93s to be not balanced inside, e.g. for case
(except pdksh didn=E2=80=99t implement it like that, it was quite the journ=
ey
for mksh to get there).

>Thanks for the explanation,

You=E2=80=99re welcome, and thanks for caring about shells!

bye,
//mirabilos
--=20
=E2=80=9ECool, /usr/share/doc/mksh/examples/uhr.gz ist ja ein Grund,
mksh auf jedem System zu installieren.=E2=80=9C
=09-- XTaran auf der OpenRheinRuhr, ganz begeistert
(EN: =E2=80=9C[=E2=80=A6]uhr.gz is a reason to install mksh on every system=
=2E=E2=80=9D)