I need braces to specify evaluation priority of expressions, but I don't want braces to create sub-scripts. Look what happens when that example code is ran:
Example script
#!/bin/bash
false || (echo "First" && exit 1)
false || (echo "Second" && exit 2)
exit 3
Output
First
Second
It seems that braces create sub-scripts, where exit doesn't cause the main script to exit.
What is the most elegant way to do what I want? Preferably without blocks and nesting. Thanks!