Tip Of The Week
This fragment of shell doesn't do what you'd expect at a quick glance:
if [ $? -ne 0 ]; then
The act of checking $? causes $? to be set to the result
of the test, so this executes exit 0 if $? is non-zero.
NP: Cosmos, Murcof