Possible Duplicate:
bash: $[<arithmetic-expression>] vs. $((<arithmetic-expression>))
The $(( expr ))
construct can be used for integer math in bash, e.g.
echo $(( 2*2 + 1 )) # 5
$[ expr ]
seems to do to do the same (but isn't documented):
echo $[ 2*2 + 1 ] # 5
Are these constructs equivalent in bash?