5 # expr returns 1 if expression is null or 0
7 N_MOD_100=`expr $N % 100`
11 if [ $N -eq 110 ]; then
17 # command subst should not inherit -e
19 echo $(false; echo ok)
29 # a failing command in the compound list following a while, until, or
30 # if should not cause the shell to exit
38 until (( x == 4 )); do
41 echo until succeeded: $x
48 # failing commands that are part of an AND or OR list should not
49 # cause the shell to exit
50 false && echo AND list failed
51 echo AND list succeeded
53 false || echo OR list succeeded
58 # make sure eval preserves the state of the -e flag and `!' reserved word
66 echo ! eval succeeded -- 1
69 echo ! eval succeeded -- 2