set -x 跟踪脚本执行信息

 

注意set -x其中"-"与"x"之间没有空格

[root@GitLab sh]# ./sx.sh heelo
+ a=heelo
+ echo heelo
heelo
[root@GitLab sh]# cat sx.sh 
#!/bin/bash
set -x
a=$1
echo $a

 

posted @ 2016-12-10 14:50  bass  阅读(197)  评论(0编辑  收藏  举报