3 ms·
It's horribly more complex than just that, the person you're replying to is "more correct" because of the rules of `set -e` which is critical in this thread; a
by gravitas 6y ago
It's horribly more complex than just that, the person you're replying to is "more correct" because of the rules of `set -e` which is critical in this thread; a singular command followed by && is treated differently than a compound command. Pull up `man bash` and search `/set.*abef` to read the rather long and involved paragraph for the `-e` option, running in a subshell is only part of it.
- asicsp 6y ago>I know $() invokes a subshell, but does () ? >My guess was that the () affects the order of operations between ; and &&, so the first line is three commands, while the second line is two. Emphasis mine. My understanding was that the question is simply about whether () invokes a subshell or not (irrespective of set -e)