4 ms·
Not your parent commenter. I'd expect let command not to return a numeric value at all, since bash uses the returned numeric value to indicate success/failure.
by powersnail 4y ago
Not your parent commenter. I'd expect let command not to return a numeric value at all, since bash uses the returned numeric value to indicate success/failure. But that admittedly doesn't have anything to do with the design of "set -e".
- thayne 4y agolet doesn't return the numeric value of the expression as an exit code: > If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise. Which allows you to do things like: while let --i; do some command; done or if let x > 4; then some command; fi