Bash – $(( )) vs. $[]

Johnny Rosenberg gurus.knugum at gmail.com
Mon Dec 3 17:02:37 UTC 2012


~$ a=3
~$ b=4
~$ echo $(($a+$b))
7
~$ echo $[$a+$b]
7
~$


So are these syntaxes equivalent? If not, what are the differences?



Kind regards

Johnny Rosenberg
ジョニー・ローゼンバーグ


More information about the ubuntu-users mailing list