tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: sh: arithmetic: ++ operator unsupported



    Date:        Wed, 11 Nov 2026 16:24:32 +0100
    From:        Edgar Fu� <ef%math.uni-bonn.de@localhost>
    Message-ID:  <avSIsI6pjxOf2/9o%trav.math.uni-bonn.de@localhost>

  | I just noticed that /rescue/sh (at least the one from -6) doesn't know ++ 
  | in an Arithmetic Expansion.

Not a great surprise.   -6 ???

  | Is there a list what else /rescue/sh is missing (apart from vi mode)?

That (vi editing mode) probably shouldn't be missing, are you sure?
Did you "set -V" (along with setting TERM etc).

But ++ isn't missing from "/rescue/"sh in -6, it is missing from sh in -6
(maybe in -7 as well, I don't remember the timeline).

There should be little missing from /rescue/sh that is in /bin/sh in
general - the obvious one is, that, as it is statically linked, it has
even less locale support than /bin/sh does.

But any /bin/sh from NetBSD 6 is going to be full of bugs (though most
of them wouldn't affect normal operations - NetBSD had been using even
more bug ridden versions for a couple of decades by then).

  | And out of curiosity: why is it missing ++?

No-one had bothered to implement it?    ++ wasn't, and still isn't,
a POSIX required operator in shell arithmetic (and -- of course).

If it helps, it got implemented (along with the ',' operator, also
not required) in late(ish) July 2017.

kre




Home | Main Index | Thread Index | Old Index