BASH Shell set command details

Source: Internet
Author: User
Tags line editor

The SET command can be used to set various shell options or to list shell variables. A single option can be used to set common features.
After some options, the-O parameter opens special features. After some options, using the + O parameter will disable some features,
The SET command without any parameters will display all the shell variables. Unless an invalid option is encountered, set always
Returns true.
When bash shell is called, all options can be listed. The current option set is listed in $-. In the option Parameter
After processing, other parameters are assigned to location parameters ($1, $2,..., $ N)

Set [-- abefhkmnptuvxldchp] [-O option name] [arguments...]

Code:
Option description-A automatically signs the variable that has been modified or the variable that is used to export the sorted command-B is not before the original prompt, instead, it immediately triggers the state table to terminate the background task. If the command returns a non-zero value with a non-zero value, immediately exit-F to disable the path with the extension-h to define the function, and then locate and store the Function Command, when a function is executed, it usually queries all the keyword parameters of the function command-K, not just the keyword parameters before the command name, but is placed in the Environment command-M monitor mode, start task control. this option supports system shell interaction by default. the latter process runs in a separate process group. Each time the task is completed, the returned status line-N reads the command but does not execute the command. the syntax error of shell scripts is usually monitored. the option name of the-O option-name option ignored by the interactive shell can be one of the following: the option description allexport and the-A option braceexpand shell execute curly braces extension, emacs uses the emacs-style command line editing interface by default. unless the shell uses-noline-editin G option to start. Otherwise, when shell interaction occurs, by default, this option errexit is started. The result is as if the shell command ignoreeof = 10 was executed. Interactive allows the # sign before the word, in order to ignore all the characters in the command line in the interactive shell-commandsmonitor, same as-M option noclobber, same as-C option noexec, same as-N option noglob, same as-F option nohash and-D option policy -B Option nounset same-u option physical same-P option POSIX change bash attribute to match standard, the default operation is different from posix1003.2 standard verbose with-V Option VI using the Vi-style command line editor xtrace with-x option. If no option name is provided, show current option value-P open privileged mode (In this mode, $ env file is processed and cannot inherit Shell functions from the environment. if it is a valid user ID Instead of the real user group, it is automatically started. disabling this option will enable valid users and group IDs to set the user and group IDs)-t to exit after the command is read and executed-u when the parameters are included, handle non-set variables as errors (if an extension attempt appears in a non-set variable, shell displays the error message. if it is not interactive, exit with a non-ling value.)-When the V input line is read, the shell input line-X is displayed. After each simple command is extended, the PS4 extension value is displayed, the command to be executed-l save and restore the name bound to the command-D prohibit the execution of the search Hash command (usually, the command is saved in the hash list, once it is found, it will not be searched again.)-C seems to have executed the noclobber = shell command-h! Historical style substitution (this option is valid by default when shell interaction is performed)-P if this parameter is set, the symbolic link is not followed when the directory command CD is changed, instead, use the actual directory-if there is no parameter after the option, no location parameter is set. otherwise, you must set the location parameter to the signal of the argument-end option even if some parameters start with option, other parameters are assigned to the location parameter (-X and-V Options are disabled. if there is no argument, the location parameter will be retained)
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.