shopt
Manage Bash shell options: variables (stored in
$BASHOPTS) that control behavior specific to the Bash shell. Generic POSIX shell variables (stored in$SHELLOPTS) are managed with thesetcommand instead. More information: https://www.gnu.org/software/bash/manual/bash.html#The-Shopt-Builtin.
- List all settable options and whether they are set:
shopt
- Set an option:
shopt -s
- Unset an option:
shopt -u
- Print a list of all options and their status formatted as runnable
shoptcommands:
shopt -p
- Display help:
help shopt
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
