shell调试

sh -x 

set -x

中间是要调试的代码 

set +x

原文地址:https://www.cnblogs.com/howhy/p/6187401.html