Name
shopt
Synopsis
shopt [-opqsu] [option]Set or unset shell options. With no options or just
-p, prints the names and settings of the
options.
Options
-oEach option must be one of the shell option names for
set -o, instead of the options listed earlier in Shell Options.-pPrint the option settings as shopt commands that can be reread later.
-qQuiet mode. The exit status is zero if the given option is set, nonzero otherwise. With multiple options, all of them must be set for a zero exit status.
-sSet the given options. With no options, prints only those that are set.
-uUnset the given options. With no options, prints only those that are unset.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access