News for hackers. Stuff that matters.
Re:Dennis Ritchie on the priorities of && || vs. == etc. (1982) by PhilipRoman on Saturday January 06, 2024 @03:40AM (#38889699)
The shell command is very readable.

a && b && c is a common idiom for "stop if any step fails". In the shell language && and || are more like control flow concepts, rather than binary operators.

And a && b || c is a universal "ternary operator" (with one minor deviation) idiom across many languages, not just the shell

There are no comments on this comment yet.