The '!' operator in the legacy test/[ builtin does not invert the result of the -o operator. Consequently the command
[ ! -o noclobber ] amounts to a no-op, always returning exit status 0. Proof: $ set -o noclobber && [ -o noclobber ] && [ ! -o noclobber ] && echo bug bug Interestingly, the original pdksh does not have this bug, but bash has it. Thanks, - M.