I think this is more a duplicate of https://unix.stackexchange.com/questions/26063/how-are-parentheses-interpreted-at-the-command-line
– Chris MaesAug 12 '19 at 13:14
1
It runs the commands in a subshell. It's a way to avoid having the `set -e` leak outside the subshell.
– tripleeeAug 12 '19 at 13:15
`"$@"` is the list of arguments to the current script or function. The double quotes are significant and important (`$@` without quotes is basically always a bug).
– tripleeeAug 13 '19 at 08:46
@tripleee ya, I know that `$@` is a list of arguments, but what does it do in nested parentheses?
– DimsAug 13 '19 at 09:36
Exactly the same thing. It contains the arguments of the function or script these nested parentheses are in. Maybe it gets called something like `noerror echo "hello there"` where you might have the function definition `noerror () { ( set -e; "$@" ); }` and it thus end up executing `(set -e; echo "hello there" )`
– tripleeeAug 13 '19 at 09:47