Posted on 2010-11-26 09:27
幻海藍(lán)夢(mèng) 閱讀(1429)
評(píng)論(0) 編輯 收藏 所屬分類:
Linux
set命令可以用來(lái)定制shell環(huán)境,使用選項(xiàng)“o”來(lái)打開(kāi)或者關(guān)閉選項(xiàng)。例如打開(kāi)選項(xiàng):set -o
選項(xiàng),關(guān)閉選項(xiàng)目:set +o 選項(xiàng)。
例如要打開(kāi)vi交互式命令行編輯,則如下:
[root@localhost ~]#
set -o
#查看當(dāng)前設(shè)置情況
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
#關(guān)閉中
xtrace
off
[root@localhost ~]# set -o
vi #把vi選項(xiàng)打開(kāi)
[root@localhost ~]# set
-o
#查看當(dāng)前設(shè)置情況
allexport
off
braceexpand
on
emacs
off
errexit
off
errtrace
off
functrace |