Chinaunix首页 | 论坛 | 博客
  • 博客访问: 893508
  • 博文数量: 113
  • 博客积分: 3160
  • 博客等级: 少校
  • 技术积分: 1801
  • 用 户 组: 普通用户
  • 注册时间: 2011-08-19 10:09
文章分类

全部博文(113)

分类: Python/Ruby

2012-09-18 17:48:31

set命令用于设置shell内部的命令选项,它可以打开或者关闭相应的选项。


例如:

: set -e

: # 打开errexit内置命令


除了这种方式,可以使用set -o 选项打开或者关闭相应的选项。


: set -o option
: # 打开option

: set +o option
: # 关闭option

使用set -o可以查看所有的内置命令。


  1. #+begin_example
  2. $ set -o
  3. set -o
  4. allexport off
  5. braceexpand on
  6. emacs off
  7. errexit off
  8. errtrace off
  9. functrace off
  10. hashall on
  11. histexpand on
  12. history on
  13. ignoreeof off
  14. interactive-comments on
  15. keyword off
  16. monitor on
  17. noclobber off
  18. noexec off
  19. noglob off
  20. nolog off
  21. notify off
  22. nounset off
  23. onecmd off
  24. physical off
  25. pipefail off
  26. posix off
  27. privileged off
  28. verbose off
  29. vi off
  30. xtrace off
  31. #+end_example

阅读(3262) | 评论(0) | 转发(0) |
0

上一篇:grep命令详解

下一篇:xargs命令解析

给主人留下些什么吧!~~