shopt
The bash builtin that switches optional shell behaviours on and off, such as globstar or nullglob.
In more detail
shopt -s name sets an option and shopt -u name unsets it. These options are separate from the ones set changes, such as errexit.
Related terms
- globstar — A bash 4 option that makes a double star in a glob match files at any depth of subdirectories.
- set builtin — The builtin that turns shell options on with a minus sign and off with a plus sign, such as set -e and set +x.
Taught in
- Which Shell Am I In, And Getting Bash Five — Bash Scripting & Command Line Automation
- Command Substitution And Subshells — Bash Scripting & Command Line Automation
- set -e, set -u And pipefail: Promises And Traps — Bash Scripting & Command Line Automation
- Style That Prevents Bugs — Bash Scripting & Command Line Automation