5
# expr returns 1 if expression is null or 0
7
N_MOD_100=`expr $N % 100`
11
if [ $N -eq 110 ]; then
32
# command subst should not inherit -e
34
echo $(false; echo ok)
44
# a failing command in the compound list following a while, until, or
45
# if should not cause the shell to exit
53
until (( x == 4 )); do
56
echo until succeeded: $x
63
# failing commands that are part of an AND or OR list should not
64
# cause the shell to exit
65
false && echo AND list failed
66
echo AND list succeeded
68
false || echo OR list succeeded
73
# make sure eval preserves the state of the -e flag and `!' reserved word
81
echo ! eval succeeded -- 1
84
echo ! eval succeeded -- 2
87
until builtin false; do echo a; break; done
90
until eval false; do echo b; break; done
102
until . $FN; do echo a; break; done
109
${THIS_SH} ./set-e1.sub
110
${THIS_SH} ./set-e2.sub
111
${THIS_SH} ./set-e3.sub