let expr, prefer
(( expr )).
(( a++ )) || true
|| truebits ignore error status code when incrementing from
(( .. )) arithmetic compound command evaluates expressions in the same way as
let, except it's not subject to glob expansion and therefore requires no additional quoting or escaping.
This warning only triggers in Bash/Ksh scripts. In Sh/Dash, neither
(( .. )) are defined, but can be simulated with
[ $(( expr )) -ne 0 ] to retain exit code, or
: $(( expr )) to ignore it.
ShellCheck is a static analysis tool for shell scripts. This page is part of its documentation.