Article View: muc.lists.netbsd.tech.userlevel
Article #78Re: sh: arithmetic: ++ operator unsupported
From: Martin Neitzel
Date: Wed, 11 Nov 2026 17:49
Date: Wed, 11 Nov 2026 17:49
27 lines
2900 bytes
2900 bytes
EF> I just noticed that /rescue/sh (at least the one from -6) doesn't know ++ EF> in an Arithmetic Expansion. FWIW: netbsd-9 /rescue/sh does support it. EF> And out of curiosity: why is it missing ++? I guess because it just ain't required by POSIX. Never was, still isn't. Shell & Utilities -> 2.6 Word Expansions -> 2.6.4 Arithmetic Expansion: The arithmetic expression shall be processed according to the rules given in 1.1.2.1 Arithmetic Precision and Operations, with the following exceptions: * Only signed long integer arithmetic is required. * Only the decimal-constant, octal-constant, and hexadecimal-constant constants specified in the ISO C standard, Section 6.4.4.1 are required to be recognized as constants. * The sizeof() operator and the prefix and postfix "++" and "--" operators are not required. * Selection, iteration, and jump statements are not supported. Martin -- 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:
<20261111174927.CB18524CDE@hackett.marshlabs.gaertner.de>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!usenet.goja.nl.eu.org!2.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!usenet.goja.nl.eu.org!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail From: Martin Neitzel <neitzel@hackett.marshlabs.gaertner.de> Newsgroups: muc.lists.netbsd.tech.userlevel Subject: Re: sh: arithmetic: ++ operator unsupported Date: Wed, 11 Nov 2026 18:49:27 +0100 (CET) Organization: Gaertner Datensysteme, Marshlabs Sender: tech-userlevel-owner@NetBSD.org Approved: news-admin@muc.de Distribution: world Message-ID: <20261111174927.CB18524CDE@hackett.marshlabs.gaertner.de> References: <avSIsI6pjxOf2/9o@trav.math.uni-bonn.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2"; logging-data="47590"; mail-complaints-to="news-admin@muc.de" Authentication-Results: mail.netbsd.org (amavisd-new); dkim=pass (1024-bit key) header.d=marshlabs.gaertner.de X-Greylist: delayed 493 seconds by postgrey-1.37 at homeworld.NetBSD.org; Wed, 11 Nov 2026 17:57:45 UTC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=marshlabs.gaertner.de; s=hat2025; t=1794419367; i=@marshlabs.gaertner.de; bh=vPLbruQQOXpzwJNBADeSrMIR/isKvXttts6+WQzKV6I=; h=To:Subject:In-Reply-To:References:Date:From; b=rMLBnLDy5maTYlVVDj9TuLSrNVrMeVkwoFsYMljzd70W1aTuAFOEuY9VQ2VoIt0vW 5vtUqrf5qrruuxh4HqW76S/7KaD9Bc7n/bOZW8oyum6KGyUcpYU5O6bjeYUCJzaa5d ItmC23ortRg0LWcRDQG26nG5mDIt0DO1ZYVRLKo8= In-Reply-To: <avSIsI6pjxOf2/9o@trav.math.uni-bonn.de> X-Clacks-Overhead: GNU Terry Pratchett Content-Disposition: inline Precedence: bulk X-Newsgate-Id: f02c70b8849f+ X-No-Archive: Yes