From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 30275 invoked from network); 21 Jun 2021 09:47:24 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 21 Jun 2021 09:47:24 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 84BFA9C7A3; Mon, 21 Jun 2021 19:47:20 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 14F409C600; Mon, 21 Jun 2021 19:46:46 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=fail reason="key not found in DNS" (0-bit key; secure) header.d=mail.malbolge.net header.i=@mail.malbolge.net header.b="L3OCPCiF"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id F2D939C5FE; Mon, 21 Jun 2021 19:46:43 +1000 (AEST) X-Greylist: delayed 452 seconds by postgrey-1.36 at minnie.tuhs.org; Mon, 21 Jun 2021 19:46:42 AEST Received: from poseidon.malbolge.net (hera.malbolge.net [185.232.68.32]) by minnie.tuhs.org (Postfix) with ESMTPS id 38EF89C5F8 for ; Mon, 21 Jun 2021 19:46:42 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=_domainkey; bh=oMy+4RIQe CMDm6lGnlZ5OSz3tPcdaAt4gspJI15JmWI=; h=subject:to:from:date; d=mail.malbolge.net; b=L3OCPCiFu2wGpuA4/ze/ec4Jgxf9b+76ZPbjc0G9N9BzN9e K4kof+QMltmvvuoZVSIGfayrP6DHhJ8h2tSRTP/N2dRFbKYq/BgdoRkv1MLzfQAVzUg7nw /ID2cEIAotvwjE6J/hP+BBFTZtQV/NMl2c1olldIYPfpjTfkAPBRWk= Received: from hermes.malbolge.net (hermes.malbolge.net [192.168.123.201]) by poseidon.malbolge.net (OpenSMTPD) with ESMTP id 911b93c0 for ; Mon, 21 Jun 2021 11:39:07 +0200 (CEST) Received: from moon (hera.malbolge.net [10.0.11.1]) by hermes.malbolge.net (Postfix) with ESMTPSA id 2E2211B9B8F for ; Mon, 21 Jun 2021 11:39:07 +0200 (CEST) Date: Mon, 21 Jun 2021 11:37:52 +0200 From: Michael Siegel To: tuhs@minnie.tuhs.org Message-ID: <20210621113752.110edede@moon> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [TUHS] Arithmetic expansion in Unix shells X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" Hello, I'm currently trying out the rc shell (using Byron Rakitzis' implementation for Unix). Compared to Bash, which I normally use, this shell has a rather small feature set (which isn't to say that that's necessarily a bad thing). Now, one of the features that Bash has and rc doesn't have is the ability to perform arithmetic expansion. That's not really a problem because you can just use `expr` instead. I wonder, though, when arithmetic expansion as a shell built-in became a thing, especially in POSIX sh. POSIX has included that feature since at least 2001, and probably quite some years earlier, given that Bash already had it in 1995 (going by the manual page of version 1.14.7, the oldest I could find). So, maybe someone here can help me find out when this was actually standardized. Thanks. -- Michael