3 ms·
test && commit || revert is grouped like test × commit + revert so it would be the latter.
by Spivak 8y ago
test && commit || revert
is grouped like
test × commit + revert
so it would be the latter.
- kazinator 8y agoIn C and derived languages, this is true; not in the POSIX shell, though, where these are on the same precedence level, and associate left to right. $ echo 4 || echo 5 4 $ echo 4 || false && echo 5 4 5 This is because the grouping is (echo 4 || false) && echo 5.