为什么echo $((1+2))需要加两层括号
发表于 : 2013-03-09 22:39
为什么echo $((1+2))需要加两层括号?$((something)), ${something} $(something)都是什么时候用?
代码: 全选
((expression))
The expression is evaluated according to the rules described below
under ARITHMETIC EVALUATION. If the value of the expression is non-
zero, the return status is 0; otherwise the return status is 1. This
is exactly equivalent to let "expression".