Change shell properties with Linux shopt command
Bash shopt command explained with examples Shopt(SHell OPTions) is a built-in command to change the properties of a shell such as.. Its history behavior Spell check Enable special characters for echo command by default and many more. This is an excellent command which give more control on Shell for you when you are working on bash and sh shells. This command is available after bash v2 and not available in other shells such as ksh, csh etc. Lets get familiarize with shopt command with some examples. Example1: To enable an option with shopt you have to use -s (Set) option shopt -s optiontype Example.. shopt -s nullglob Example2: To disable already set option use -u along with shopt shopt -u optiontype Example3: To see what are the options set or unset execute below command. shopt or shopt -p sample output autocd off cdable_vars off cdspell off checkhash off checkjobs off checkwinsize on cmdhist on compat31 off compat32 off compat40 off compat41 off dirspell off dotglob off execfail off expand_aliases on extdebug off extglob off extquote on failglob off force_fignore on globstar off gnu_errfmt off histappend on histreedit off histverify off hostcomplete on huponexit off interactive_comments on lastpipe off lithist off login_shell off mailwarn off no_empty_cmd_completion off nocaseglob off nocasematch off nullglob off progcomp on promptvars on restricted_shell off shift_verbose off sourcepath on xpg_echo off Example4: To get help on shopt...
Read More