Hello.

Example:
---------------------------------------
#!/bin/bash

set -e -u -E -T

fun()
{
    echo 'Execute really bad command:'
    /bin/false
    echo 'should not print this'
    return 0
}

if ! fun; then
    echo 'should catch fault here'
fi

fun
---------------------------------------

"should not print this"  should not be printed (as I think) in any case.
But in first case, it's printed, in second - is not.

(I have tested in bash 2.0 ... 4.2.24)

Is any way to force "set -e" to work even in such cases?

If this question asked 1000 times, why not to answer in FAQ (
http://tiswww.case.edu/php/chet/bash/FAQ)?

-- 
Segmentation fault

Reply via email to