At Saturday 22 August 2009, Chet Ramey <chet.ra...@case.edu> wrote: > Stefano Lattarini wrote: >> I have the following scripts: >> >> [CUT] >> >> I thought that when bash detect a syntax errors in the script, >> it would pass a $? != 0 to the code in the exit trap, regardless >> of whether `set -e' is active or not. > > It's not exactly a bug -- this behavior isn't standardized > anywhere, and historical shells behave differently. The behavior > you want is useful enough that I'll change it for bash-4.1, though. > > Chet Thanks, much appreciated.
Oh, and by the way, sorry for the duplicate message. Regards, Stefano