Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between bracket and double parentheses? [duplicate]

What's the difference between these two? Example:

$ echo $((1+1))
2
$ echo $[1+1]
2

As shown here at Chapter 10, Section 2.

like image 396
Jürgen Paul Avatar asked Mar 15 '26 18:03

Jürgen Paul


1 Answers

$[expression] is deprecated syntax, to accomplish same thing.

like image 57
anishsane Avatar answered Mar 18 '26 10:03

anishsane



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!