Shell Script - 跟踪与debug

Shell Script - 追踪与debug

[root@www ~]# sh [-nvx] scripts.sh
选项与参数:
-n  :不要运行 script,仅查询语法的问题;
-v  :再运行 sccript 前,先将 scripts 的内容输出到萤幕上;
-x  :将使用到的 script 内容显示到萤幕上,这是很有用的参数!

举例:

Shell Script - 跟踪与debugShell Script - 跟踪与debug

Shell Script - 跟踪与debugShell Script - 跟踪与debug

版权声明:本文为博主原创文章,未经博主允许不得转载。