See http://redsymbol.net/articles/unofficial-bash-strict-mode/ This will require script-by-script implementation, with testing.