Stepan Koltsov wrote:
BTW, my use case for "(false)" is:

===
set -e
( cd some-dir && make )
( cd other-dir && ./build.sh )
( cd third-dir && ant )
===

Most readers (and writers) expect script to fail if "make" failed. So
I think that outer bash should exit with error on "(false)" :-)
----
        I wouldn't, since you are placing the ops in a subshell --
only the subshell has the "error", but the top level shell wouldn't
have an error just because a subshell exited.  If you want the
shell to exit, use braces:

{ cd some-dir &* make ; }   
#   braces don't parse as end-of-line delimiters
#   like parens do, so the semicolon is needed after make



Reply via email to