On 11/23/2011 03:26 AM, Марк Коренберг wrote:
> Repeat-By:
>       mmarkk@mmarkk-work:~$ ( set -e; echo aaa; false; echo bbb )
>       aaa
>       mmarkk@mmarkk-work:~$ ( set -e; echo aaa; false; echo bbb ) || true
>       aaa
>       bbb
>       mmarkk@mmarkk-work:~$

ksh has the same behavior, and POSIX requires it (basically, running the
subshell on the left of || has a higher precedence than the explicit
'set -e' within the subshell).

http://austingroupbugs.net/view.php?id=52

Expected behavior.  And one of the arguments I give why using the crutch
of 'set -e' is almost always the wrong thing in a complex script.

-- 
Eric Blake   ebl...@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to