可以在sh内使用set -x,使用后,会打印每条命令的输出

在shell中设置

set -x 开启 

set +x 关闭

也可以在执行脚本时加参数

sh -x *.sh

posted on 2020-09-09 15:35  夏雨等秦天  阅读(150)  评论(0编辑  收藏  举报