let <EXPRESSION>
The let builtin command evaluates the arithmetic expression <EXPRESSION> and returns the exit codes
<EXPRESSION> evaluated to not 0 (arithmetic "true")<EXPRESSION> evaluated to 0 (arithmetic "false")The form (note the quoting!)
let "<EXPRESSION>"
is identical to the arithmetic evaluation compound command
(( <EXPRESSION> ))
This way should be preferred.
The let command is not specified by POSIX®. The standard equivalent is:
[ "$(( <EXPRESSION> ))" -ne 0 ]
The quotes around the arithmetic expansion are only necessary with bash and AT&T versions of ksh, other standard shells such as ash, pdksh or zsh derivatives don't have that bug/misfeature.
Discussion