3 ms·
Note ShellCheck's SC2015, especially if you do stuff with permanent consequences in the place of "say": "A && B || C is not if-then-else. C may run when A is t
by j1elo 6y ago
Note ShellCheck's SC2015, especially if you do stuff with permanent consequences in the place of "say":
"A && B || C is not if-then-else. C may run when A is true":
https://github.com/koalaman/shellcheck/wiki/SC2015 https://github.com/koalaman/shellcheck/wiki/SC2015
- yesenadam 5y agoInteresting! Good to know, thanks. I never mix && and || in the same line, but didn't know exactly why that is! The problem is that "In this case, if A is true but B is false, C will run." I guess with B as "say", B will never be false, but generally it's really not the same as if-then-else.