Bash - Let (Arithmetic expression evaluation)

> Procedural Languages > Bash Shell and (Unix|Linux) Utilities (XCU)

1 - About

Let is a builtin command that evaluate an arithmetic expression.

Advertising

3 - Syntax

let arg [arg ...]
# equivalent to
((expression))

where:

If:

  • the last arg evaluates to 0, let returns 1;
  • 0 is returned otherwise.

4 - Documentation / Reference