On Mon, Nov 09, 2009 at 08:39:57AM +0200, Ciprian Dorin, Craciun wrote:
> But then how can I solve the problem? (How about `()` which
> clearly is a new shell instance.)
The problem being "how to use set -e in a consistent manner across all
shells"? You can't. set -e is unpredictable, unreliable, and should be
shunned. As you can see by the last dozen or so message on this mailing
list, not even bash gurus (other than Chet) can figure out its semantics.
Check for errors yourself on the commands that matter. That way you'll
know what will cause termination and what won't. Yes, I know, it means
your script is longer. But longer is better than unpredictable.