I have a script with the following code:
command_that_could_fail || (echo "command failed"; exit 1)
However, the exit seems to just be exiting from the sub-command formed by the second part of the line (in parentheses), not from the script itself. Any way that I can make it behave as desired, and exit from the outer script?