>All of this is intentional, and not a bug.
It is possible to be both.
But, yes, it reflects a fundamental inconsistency in the C/Unix ecosystem.
The fact that in most programming languages (e.g., C, AWK), 0 means false and
non-zero
means true, but in the shell, it is the opposite.
E.g., in AWK, I often want to do something like: exit(a == b)
which, obviously, doesn't work like you want it to.
P.S. Note that there is an implicit assumption in this text that:
false and failure mean the same thing
and
true and success mean the same thing
Also, note that if you are running with "set -e" (or "trap ... ERR"), then
having
"let" (or "(( ))") return a non-zero exit status when it happens to evaluate to
zero,
could cause an unexpected script abort.
=================================================================================
Please do not send me replies to my posts on the list.
I always read the replies via the web archive, so CC'ing to me is unnecessary.
Note that they always end up in my Spam file anyway, so it is annoying to have
to
periodically clean that out.