> Arithmetic expansion provides a mechanism for evaluating an arithmetic expression and substituting its value. > The format for arithmetic expansion shall be as follows: > > $((expression)) > > The expression shall be treated as if it were in double-quotes, except that a double-quote inside > the expression is not treated specially. The shell shall expand all tokens in the expression for > parameter expansion, command substitution, and quote removal.
まず、$(( )) の中にある。これがexpressionだ。 expand all tokens in the expression 式の中にある以下のトークンの展開、 for parameter expansion, command substitution, and quote removal. パラメータ展開、コマンド置換、クォートの削除
> Next, the shell shall treat this as an arithmetic expression and substitute the value of the expression. その次(Next)に この式を arithmetic expression (算術式)として扱う