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.
More Related Contents:
- Using the && operator in an if statement
- How to concatenate string variables in Bash
- Difference between single and double quotes in Bash
- Why should there be spaces around ‘[‘ and ‘]’ in Bash?
- Command not found error in Bash variable assignment
- Why does shell ignore quoting characters in arguments passed to it through variables? [duplicate]
- How to escape single quotes within single quoted strings
- How to use double or single brackets, parentheses, curly braces
- When do we need curly braces around shell variables?
- Brace expansion with variable? [duplicate]
- What is the benefit of using $() instead of backticks in shell scripts? [duplicate]
- Usage of :- (colon dash) in bash
- Why equal to operator does not work if it is surrounded by space?
- What is the purpose of “&&” in a shell command?
- Tilde in path doesn’t expand to home directory
- How do I use floating-point arithmetic in bash?
- Bash syntax error: unexpected end of file
- Test for non-zero length string in Bash: [ -n “$var” ] or [ “$var” ]
- Ternary operator (?:) in Bash
- Compound ‘if’ statements with multiple expressions in Bash
- What is the difference between ${var}, “$var”, and “${var}” in the Bash shell?
- Why source command doesn’t work with process substitution in bash 3.2?
- How to escape history expansion exclamation mark ! inside a double quoted string?
- Commenting in a Bash script inside a multiline command
- What is the difference between operator “=” and “==” in Bash?
- What does “plus colon” (“+:”) mean in shell script expressions?
- Why equal to operator does not work if it is not surrounded by space?
- What does the curly-brace syntax ${var%.*} mean?
- Rsync syntax error when run from bash script
- What is the proper way to test a Bash function’s return value?