[TUHS] Arithmetic expansion in Unix shells

Michael Siegel msi at malbolge.net
Tue Jun 22 00:43:15 AEST 2021


Am Mon, 21 Jun 2021 09:50:38 -0400
schrieb Chet Ramey <chet.ramey at case.edu>:

> The $((...)) form of arithmetic expansion is something POSIX picked up
> from ksh-88, eventually. The early drafts of the standard (through
> 1003.2 d9, at least), used $[...], but they eventually adopted
> $((...)) because ksh-88 had already implemented it, though it's not
> documented in Bolsky and Korn.

So, in other words, POSIX shell (meaning the shell described in the
standard as it has been released) had double-parentheses arithmetic
evaluation from the start?


--
Michael


More information about the TUHS mailing list