代码: 全选
$ man cd
$ type cd
$ help cd
比如你想知道经常看到有人用set -e或者 set -x是啥意思,与其谷歌不如看文档直接$ help set | less
结果如下:
当然要学好英文~~-e Exit immediately if a command exits with a non-zero status.
解说:什么是a non-zero status非零状态,shell命令和脚本执行有两个结果,一个是zero:命令执行成功;另一个是nonzero:命令执行失败。
参考http://www.freeos.com/guides/lsst/ch02sec09.html
-x Print commands and their arguments as they are executed.
-x基本上是用在调试环境中
