Bash Arithmeticsuggest change
- $(( EXPRESSION )) - Evaluates expression and returns its result.
- expr EXPRESSION - Prints result of EXPRESSION to stdout.
Parameter | Details | —— | —— | EXPRESSION | Expression to evaluate |
A space (” “) is required between each term (or sign) of the expression. “1+2” won’t work, but “1 + 2” will work.
Table Of Contents