Expand description
Arithmetic expression evaluation for shell-style $(( )) expressions.
Supports:
- Integer arithmetic:
+,-,*,/,% - Comparison operators:
>,<,>=,<=,==,!=(return 1 or 0) - Parentheses for grouping:
(expr) - Variable references:
$VARor bareVAR - Integer literals
Does NOT support:
- Floating point (pipe to
jqfor float math) - Bitwise operations (shell-ism we’re skipping)
- Assignment within expressions (confusing)
Functions§
- eval_
arithmetic - Evaluate an arithmetic expression string.