Re: 'set -e' with '!' and '&&' POSIX issue

2016-10-02 Thread Thorsten Glaser
Martijn Dekker dixit: >http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_25 >| 2. The -e setting shall be ignored when executing the compound list >| following the while, until, if, or elif reserved word, a pipeline >| beginning with the ! reserved word, or any

'set -e' with '!' and '&&' POSIX issue

2016-10-02 Thread Martijn Dekker
There seems to be a POSIX issue with 'set -e' ('set -o errexit') on mksh. The script: set -e ! false && false echo wrong should not output anything, which is the actual behaviour on every shell except pdksh and mskh. This only occurs if the command starts with a '!'. The f