> let intentionally returns status 1 if the value was 0; and status > 1 if > there was an error. Why? So you can do loops such as: > > countdown=10 > while let countdown--; do ... ; done > >> Why does this happen? Is it 'by design'? > > Yes. The same as for 'expr' which is standardized by POSIX to have the > same behavior.
This is a design mistake: it trades a few characters for a lot of confusion.