BASHshellset command details

Source: Internet
Author: User
Tags line editor
BASHshellset command details use the set command to set various shell options or list single options of shell variables set common features after some options-o parameters open special features after some options use + o parameters will disable some features, the set command without any parameters will display the BASH shell set command details. you can use the set command to set various shell options or list shell variables. set common features for a single option. 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 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 $. after the option parameter is processed, other parameters are assigned to the position parameter ($1, $2 ,..., $ n) set [-- abefhkmnptuvxldCHP] [-o option name] [arguments .. .] Source 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 background 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-edit The ing option is enabled. otherwise, when the shell interacts, 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. for effective use The user ID instead of the real user group 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, do not set the location parameter. 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.