Re: set -e not ignored in AND-OR list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Nov 23, 2024 at 04:22:52AM +0100, Christoph Anton Mitterer wrote:
> 
> @Herbert, you've said that you believe dash's behaviour is POSIX
> compliant.
> But I still couldn't find anything in the text which would imply
> this... and Harald who typically knows things quite well also seems to
> believe that POSIX doesn't allow it.

It's simple really, POSIX says:

	or any command of an AND-OR list other than the last.

The word "command" refers to the commands that make up the AND-OR
list.  Command substitution is not part of that at all.

I agree that it is suboptimal for subshells to exit in dash,
but I think there is no ambiguity that the above statement applies
to subshells.  Just look at the shell grammar.

Cheers,
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux