Set command detail: On, turn off Shell feature properties

Source: Internet
Author: User

Set is a shell internal command to turn shell feature properties on or off, and if nothing is added, the user-defined variables and environment variables are displayed directly

Syntax: Set [Options ...]

Options:

- F : Disable wildcard characters

+f : Enable wildcard characters

- u : If there are variables that are not set in the script, immediately let the script exit execution and display an error message

+u : If the "-u" option is set, the function of the "-u" option is turned off

- e : Exit immediately if command execution fails (terminal or script)

+e : The ability to turn off the "-e" option if the "-e" option is set

- M : Enable Job control

+m : Turn off Job control

- v : Show shell input line

+v : Turn off the "-V" option if the "-V" option is set

- x : Displays commands and their arguments at execution time

+x : If the "-X" option is set, the function of the "-X" option is turned off

- N : Used to check syntax; in script, read command, but do not execute

+n : If the "-N" option is set, the function of the "-n" option is turned off

- H : Enable "! [NUMBER],!! Call History command (enabled by default)

+h : Off! " [NUMBER],!! The Call History command

- C : If set, does not allow overwriting of existing regular files by redirecting output

+c : If the "-C" option is set, the function of the "-C" option is turned off

- P : If set, do not follow the soft link when executing the command, but go directly to the directory that the soft link points to

+p : If the "-P" option is set, the function of the "-P" option is turned off

- o : Special Options

History : Enable history command

ignoreeof : Disable "Ctrl+d" to exit the shell, if you want to exit, you need to use "exit"

interactive-comments : Under Interactive default, #用来做注释 (enabled by default)

Cases:

Disable system wildcard characters

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/9C/C0/wKioL1l1p-jzfOlSAAA3OtDXspI014.png "title=" 1.png "alt=" Wkiol1l1p-jzfolsaaa3otdxspi014.png "/>


To open a wildcard character

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/9C/C0/wKiom1l1qJjhjJ8ZAAAYY2UfCPU543.png "title=" 2.png "alt=" Wkiom1l1qjjhjj8zaaayy2ufcpu543.png "/>


Command execution failed to exit

650) this.width=650; "src=" https://s5.51cto.com/wyfs02/M01/9C/C0/wKioL1l1qK7C5uAMAAFGscj0jy0409.jpg "title=" 3.jpg "alt=" Wkiol1l1qk7c5uamaafgscj0jy0409.jpg "/>


Show shell input Lines

650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M00/9C/C0/wKiom1l1qMXyE80oAAGZKnnCa54626.jpg "title=" 4.jpg "alt=" Wkiom1l1qmxye80oaagzknnca54626.jpg "/>


No use! Call History command

650) this.width=650; "src=" https://s5.51cto.com/wyfs02/M02/9C/C0/wKiom1l1qOfz8_RZAAEyIGXa1OI824.jpg "title=" 5.jpg "alt=" Wkiom1l1qofz8_rzaaeyigxa1oi824.jpg "/>

Disable overwrite redirection

650) this.width=650; "src=" https://s4.51cto.com/wyfs02/M02/9C/C0/wKiom1l1qQST-ViAAAEhQx4d3sw191.jpg "title=" 6.jpg "alt=" Wkiom1l1qqst-viaaaehqx4d3sw191.jpg "/>


This article is from "ZYJTF Lone Cloud Twilight" blog, please be sure to keep this source http://zhangdaifu.blog.51cto.com/11848193/1950494

Set command detail: On, turn off Shell feature properties

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.