bug-bash
[Top][All Lists]
Advanced

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

Error handling question


From: Ciprian Dorin, Craciun
Subject: Error handling question
Date: Sun, 8 Nov 2009 19:05:38 +0200

    Shouldn't any of the following scripts print `error`? (Bash
4.0.35(2)-release on ArchLinux.)

    Or I've miss-interpreted the documentation...

    Thanks,
    Ciprian.


~~~~
set -e -o pipefail
( false ; echo ok ; ) || echo error
~~~~

~~~~
set -e -o pipefail
( false ; echo ok ; ) | true || echo error
~~~~

~~~~
set -e -o pipefail
{ false ; echo ok ; } || echo error
~~~~

~~~~
set -e -o pipefail
{ false ; echo ok ; } | true || echo error
~~~~




reply via email to

[Prev in Thread] Current Thread [Next in Thread]