我想问一下在shell中 $- 变量的含义,有没有什么 man page。
PS:默认值
user $ echo $-
himBH
离线
man bash
/\$- # 可以看到 i 表示 interactive
n # 可以看到:The current set of options may be found in $-.
往上翻,可以看到
-h Remember the location of commands as they are looked up
for execution. This is enabled by default.
-m Monitor mode. Job control is enabled. This option is
on by default for interactive shells on systems that
support it (see JOB CONTROL above). Background pro‐
cesses run in a separate process group and a line con‐
taining their exit status is printed upon their comple‐
tion.
-B The shell performs brace expansion (see Brace Expansion
above). This is on by default.
-H Enable ! style history substitution. This option is on
by default when the shell is interactive.
最近编辑记录 cjxgm (2014-02-07 23:18:50)
Giumo Clanjor (哆啦比猫/兰威举)
Where there is a hacker, there is art. | Dogfooding myself. (C++ / Lua / Perl / Rust)
离线