Mike Frysinger wrote:
On Saturday 07 April 2012 16:45:55 Linda Walsh wrote:
Is it an accidental omission from the bash manpage?
it's in the man page. read the "Arithmetic Expansion" section.
-mike
====
My 4.2 manpage says:
Arithmetic Expansion
Arithmetic expansion allows the evaluation of an arithmetic expression
and the substitution of the result. The format for arithmetic expan-
sion is:
$((expression))
The expression is treated as if it were within double quotes, but a
double quote inside the parentheses is not treated specially. All
tokens in the expression undergo parameter expansion, string expansion,
command substitution, and quote removal. Arithmetic expansions may be
nested.
The evaluation is performed according to the rules listed below under
ARITHMETIC EVALUATION. If expression is invalid, bash prints a message
indicating failure and no substitution occurs.
----------
No mention of square brackets.
What's yours say?