I managed to reproduce this (on NetBSD 1.5.2), and reduced the failure to the following script:
% cat foo.sh set -e for x in a; do BAR="foo" false && echo true echo mumble done % sh -x foo.sh + set -e + BAR=foo + false This ought to print "mumble". It does so if you remove the loop or the variable assignment. So that's definitely looks like bug in NetBSD's sh. Could you take care of reporting this bug wherever appropriate? (I'm not a NetBSD user myself, and the sh man page doesn't show any bug-report address.) -- Alexandre Duret-Lutz