bash: $[] vs. $(())

The manpage for bash v3.2.48 says:

[…] The format for arithmetic expansion is:

     $((expression))

The old format $[expression] is deprecated and will be removed in upcoming versions
of bash.

So $[...] is old syntax that should not be used anymore.

Leave a Comment