let builtin

The bash builtin that evaluates arithmetic given as arguments, as in let "total = a + b".

In more detail

It works like (( )) but each expression is a separate argument, so one with spaces must be quoted. Most scripts use (( )) instead because it needs no quoting. let is a bash feature, not POSIX.

Example

let "total = a + b"

Related terms

Taught in

References