Hello,

I have a bash script with trap, but the trap doesn't catch the error.

function handle {
echo "This should be reached
exit 1
}
trap handle ERR
ls nonexist | tee -a output.log
echo "This should not be reached"

outputs

ls: nonexist: No such file or directory
This should not be reached

How come?

Stefan


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to