+ -
当前位置:首页 → 问答吧 → 脚本中的set -v问题

脚本中的set -v问题

时间:2011-05-01

来源:互联网

在脚本中设置set -v是不是将所执行的命令全部输出?
哪个高手解释一下这个到底是怎么用的?用来做什么的?
Thanks in advanced

作者: charlesmelunix   发布时间: 2011-05-01

The verbose (-v) option to the shell is more useful if you simply want to see the running
code of the script that you’re working with (as opposed to the expanded values of variables)
to make sure the code is working as designed with the xtrace (-x) option.

作者: linfenghuaster   发布时间: 2011-05-01