Article View: muc.lists.netbsd.tech.userlevel
Article #79Re: sh: arithmetic: ++ operator unsupported
From: Robert Elz
Date: Thu, 12 Nov 2026 07:41
Date: Thu, 12 Nov 2026 07:41
43 lines
2593 bytes
2593 bytes
Date: Wed, 11 Nov 2026 16:24:32 +0100
From: Edgar Fuß <ef@math.uni-bonn.de>
Message-ID: <avSIsI6pjxOf2/9o@trav.math.uni-bonn.de>
| 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
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID:
<29022.1794469264@jacaranda.noi.kre.to>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mailReferences:
<avSIsI6pjxOf2/9o@trav.math.uni-bonn.de>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail From: Robert Elz <kre@munnari.OZ.AU> Newsgroups: muc.lists.netbsd.tech.userlevel Subject: Re: sh: arithmetic: ++ operator unsupported Date: Thu, 12 Nov 2026 14:41:04 +0700 Organization: Newsgate at muc.de e.V. Sender: tech-userlevel-owner@NetBSD.org Approved: news-admin@muc.de Distribution: world Message-ID: <29022.1794469264@jacaranda.noi.kre.to> References: <avSIsI6pjxOf2/9o@trav.math.uni-bonn.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2"; logging-data="47072"; mail-complaints-to="news-admin@muc.de" In-Reply-To: <avSIsI6pjxOf2/9o@trav.math.uni-bonn.de> Precedence: bulk X-Newsgate-Id: f02c70b8849f+ X-No-Archive: Yes