Use the SET command to set various shell options or to list shell variables. A single option sets commonly used attributes. After some options, the-o parameter opens special properties. After some options use +The o parameter will turn off some attributes, and the set command without any parameters will show all of the shell's variables. The set always returns ture unless an illegal option is encountered. When the shell is called, you can list all options. The current set of options is listed in the-Medium. After the option parameter is processed, the other parameters are assigned to the position parameter ($1,$2,..., $n) Set [--ABEFHKMNPTUVXLDCHP] [-o option name] [Arguments ...] Option Description-a automatically flags a variable that has been modified or a variable to export a post order-B is not before the original prompt, but instead immediately raises the status table of the terminating background task-e If the command returns with a value other than 0, exit immediately-f prohibit path with extension-h define functions, locate and store function commands, and when functions are executed, query function commands usually-k all keyword parameters, not just those in front of the command name, are placed in the environment command-m monitor mode, start task control. This option supports system shell interaction by default. The background process runs as a separate process group and displays a status line containing the exit each time the task is completed-N reads the command without executing the command. Usually monitors syntax errors in shell scripts. Interactive shell is ignored-O option-The name Option name can be one of the following: option description Allexport-The A option braceexpand the shell to execute the curly brace extension and, by default, Emacs uses the Emacs style command-line editing interface. Unless the shell-noline-The editing option starts, otherwise when the shell interacts, the option is errexit by default to start the same-e option Histexpand with-h Option ignoreeof The result is like a shell command ignoreeof=10 executed interactive allows the word to be in front with the # number so that all characters in the command line are ignored in the interactive shell-Commandsmonitor with-m option Noclobber with-C option noexec with-n option Noglob with-f option Nohash with-d option notify with-b option Nounset with-u option physical with-The p option POSIX changes the Bash property to match the standard, and the default action differs from the POSIX1003.2 standard verbose-v OptionVIUse the VI-style command-line editor Xtrace-x option to display the current option value if no option name is given-p Opens the privileged mode (in this mode, the $ENV file is processed, and the shell function cannot be inherited from the environment. If it is a valid user ID instead of an actual user group, it is started automatically. Turn off this option to make the effective user and group IDs set up Utility users and group IDs)-T exits after reading the command and executing it-u when performing parameter bracketing, the non-set variable is treated as error (if the extension attempt appears in a non-set variable, the shell displays an error message.) If it is not interactive, exit with a non-atom value)-v input line is read, the shell input line is displayed-x after each simple command is expanded, display the PS4 extension value, followed by the command to be executed-l Save and restore the name of the binding in the command-D disables the lookup hash command (typically, the command is saved in a hash list, and is no longer searched once it has been found)The-C effect seems to have been performed noclobber=shell Command-H use!Historical substitution of styles (this option is available by default when the shell interacts)-P If you set this parameter, do not follow the symbolic link when executing the Change Directory command CD, but instead use the actual directory if there are no parameters after the option, the position parameter is not set. Otherwise, even if some parameters start with the A option, set the position parameter to argument-the signal of the end option will throw the remaining parameters to be assigned to the position parameter (the-X and-v options are turned off.) If there is no argument, the positional parameter will retain the unchanged parameters)
Shell SET Command