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)" :-) Of course, script can be rewritten as === ( cd some-dir && make ) || false === S. On 1/29/08, Pierre Gaston <[EMAIL PROTECTED]> wrote: > On Jan 29, 2008 8:09 PM, Stepan Koltsov <[EMAIL PROTECTED]> wrote: > > What is "simple command"? > > > > Is > > > > === > > ( false ) || false > > === > > > > simple? Seems like it is not, however > > > > === > > set -e > > > > ( false ) || false > > > > echo "end" > > === > > > > Prints nothing and exits with error. > > Indeed according to man bash, this is a list It is perhaps possible to > consider that the last false is executed as a simple > command but I think the documentation of set -e could perhaps be made > more clear about what happens when > the last command of a list exits with non 0. > > I understand why it is implemented this way, so that any non processed > error exits the shell. > > The shells seems to disagree on what (false) should do (ksh and zsh > exit the shell, dash and bash only the subshell. > They also seems to disagree on what ! true should do ( zsh exits, bash > dash and ksh don't) >