Posted on 2010-11-26 09:27
幻海藍夢 閱讀(1426)
評論(0) 編輯 收藏 所屬分類:
Linux
set命令可以用來定制shell環境,使用選項“o”來打開或者關閉選項。例如打開選項:set -o
選項,關閉選項目:set +o 選項。
例如要打開vi交互式命令行編輯,則如下:
[root@localhost ~]#
set -o
#查看當前設置情況
allexport
off
braceexpand
on
emacs
on
errexit
off
errtrace
off
functrace
off
hashall
on
histexpand
on
history
on
ignoreeof
off
interactive-comments
on
keyword
off
monitor
on
noclobber
off
noexec
off
noglob
off
nolog
off
notify
off
nounset
off
onecmd
off
physical
off
pipefail
off
posix
off
privileged
off
verbose
off
vi
off
#關閉中
xtrace
off
[root@localhost ~]# set -o
vi #把vi選項打開
[root@localhost ~]# set
-o
#查看當前設置情況
allexport
off
braceexpand
on
emacs
off
errexit
off
errtrace
off
functrace |