What is Shopt in Bash


Next:15.4.2 sourceUp:15.4 Further built-in commands of the Previous:15.4 Other built-in commands of the

Subsections



15.4.1 shops

The command shows and changes the status of the variables for controlling the optional functions of bash. shopt [OPTIONS] [OPTION VARIABLES LIST]
Options
 

The list of variables and their meaning can be found in the manual page for Bash ().

15.4.1.1 Example

The command without parameters shows the status of the variable. ole @ enterprise: ~> shopt cdable_vars off cdspell off checkhash off checkwinsize on cmdhist on dotglob off execfail off expand_aliases on extglob on histreedit off histappend off histverify off hostcomplete on huponexit off interactive_comments on lithist off mailwarn off no_comments on lithist off mailwarn off no_complety offcmdocompas prompt nv_complety offcmdocompas on restricted_shell off shift_verbose off sourcepath on xpg_echo off ole @ enterprise: ~> shopt sourcepath sourcepath on

With and the variables are set and switched off again.

ole @ enterprise: ~> shopt -u sourcepath ole @ enterprise: ~> shopt sourcepath sourcepath off ole @ enterprise: ~> shopt -s sourcepath ole @ enterprise: ~> shopt sourcepath sourcepath on

Next:15.4.2 sourceUp:15.4 Other built-in commands of the Previous:15.4 Other built-in commands of the