Date: Mon, 14 Mar 2016 00:09:22 +0300 From: Aleksej Saushev <a...@inbox.ru> Message-ID: <87twka9jb1....@inbox.ru>
| Are "&&" and "||" arithmetic expressions or ones of more general kind? The ones in question are arithmetic (inside an $(( )) expansion.) The "command line" || and && operate exactly as you described, and no-one is planning to (or ever would) change that. In my initial message, what was "odd" was not lazy eval of && and ||, that's been around forever, but that it would be implemented that way in ash (and remain in NetBSD's sh) in an environment when it is supposed to be copying C expressions (so much so that the posix shell definition of expressions in $(( )) just says "the same as this..." and points at the C std, "except for no need for" ++, --, sizeof (and C statements, if/while/switch etc). kre