Generate production-ready shell scripts with error handling