3 ms·
condition && action condition || action (or the equivalent for languages where the logical operators are written differently) are not bash-exclusive idioms;
by dragonwriter 6y ago
condition && action
condition || action
(or the equivalent for languages where the logical operators are written differently) are not bash-exclusive idioms; I've seen them in a number of expression-oriented languages (less frequently on statement-oriented languages where the particular action is a function rather than a statement, but the fact that it isn't usable consistently in those.
languages tends to make it less idiomatic there.)