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
原文地址:https://www.cnblogs.com/bass6/p/6155702.html