<!-- /* Font Definitions */ @font-face {font-family:宋体; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:SimSun; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:"\@宋体"; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; text-align:justify; text-justify:inter-ideograph; mso-pagination:none; font-size:10.5pt; mso-bidi-font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:宋体; mso-font-kerning:1.0pt;} /* Page Definitions */ @page {mso-page-border-surround-header:no; mso-page-border-surround-footer:no;} @page Section1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;} div.Section1 {page:Section1;} -->
⒉设置 Bash 选项:
⑴ set 命令:
选 项 名 | 快捷开关 | 含 义 |
---|---|---|
allexport | -a | 从这个选项被设置开始就自动标明要输出的新变量或修改过的变量,直至选项被复位 |
braceexpand | -B | 打开花括号扩展,它是一个默认设置 |
emacs | 使用emacs内置编辑器进行命令行编辑,是一个默认设置 | |
errtrace | -E | |
functrace | -T | |
errexit | -e | 当命令返回一个非零退出状态(失败)时退出。读取初始化文件时不设置 |
hashall | -h | |
histexpand | -H | 执行历史替换时打开!和!!扩展,是一个默认设置 |
history | 打开命令行历史、默认为打开 | |
ignoreeof | 禁止用EOF(Crtl+D)键退出shell。必须键入exit才能退出。等价于设置shell变量IGNOREEOF=10 | |
interactive-comments | 对于交互式shell,把#符后面的文本作为注释 | |
keyword | -k | 将关键字参数放到命令的环境中 |
monitor | -m | 设置作业控制 |
noclobber | -C | 防止文件在重定向时被重写 |
noexec | -n | 读命令,但不执行。用来检查脚本的语法。交互式运行时不开启 |
noglob | -f | 禁止用路径名扩展。即关闭通配符 |
nolog | ||
notify | -b | 后台作业完成时通知用户 |
nounset | -u | 扩展一个未设置的变量时显示一个错误信息 |
onecmd | -t | 在读取和执行命令后退出 |
physical | -P | 设置时,在键入cd或pwd时禁止符号链接。用物理目录替代 |
pipefail |