wiki.bash-hackers.org/syntax/ccmd/arithmetic_eval.md
2023-04-15 23:23:49 +12:00

1.0 KiB

====== Arithmetic evaluation (command) ======

===== Synopsis ===== <code> (( <EXPRESSION> )) </code>

===== Description ===== This command evaluates the arithmetic expression ''<EXPRESSION>''.

If the expression evaluates to 0 then the exit code of the expression is set to 1 (''FALSE''). If the expression evaluates to something else than 0, then the exit code of the expression is set to 0 (''TRUE''). For this return code mapping, please see this section.

The functionality basically is equivalent to what the ''let'' builtin command does. The arithmetic evaluation compound command should be preferred.

===== Examples =====

===== Portability considerations =====

===== See also =====