Set command finishing

  
 

Use the set command to set various shell options or list shell variables. Single options set common features.

After some options -o parameters turn special features on. Use after some options The +o parameter will turn off certain features,

The set command without any arguments will display all variables of the shell. Unless an illegal option is encountered, the set will always be

return ture. Br>

When the 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 positional parameters. Medium ($1,$2,...,$n)

set [--abefhkmnptuvxldCHP] [-o option name] [arguments ...]

Source code:

Option Description

-a Automatically flags the variables that have been modified or the variables that are exported to the command.

-b is not immediately before the original prompt, but immediately causes the status of the background task to be terminated. Table

-e If the command returns with a non-zero value, exit immediately

-f disable the path with the extension

-h When defining the function, Bit and store function commands, when the function is executed, usually query

function command

-k all keyword parameters, not just the keyword parameters before the command name, are placed < Br>

In the environment command

-m monitor mode, start task control. This option supports system shell interaction by default. After

the station process runs as a separate process group, in Shows

status line with exit each time the task is completed

-n Reads the command but does not execute the command. Normally monitors syntax errors of shell scripts. Interactive

shell Ignored

-o option-name The option name can be one of the following:

Option Description

allexport Same as -a option

braceexpand shell execution flower Parenthesis extension, works by default

emacs uses the emacs style command line to edit the interface. Unless the shell is started with the -noline-editing

option, this is enabled by default when the shell interacts. Options

errexit with -e option

histexpand same-H option

ignoreeof its knot It is as if the shell command IGNOREEOF=10 is executed

interactive allows the word to be preceded by a ##, so that all characters of the command line are ignored in the interactive shell

-commands

monitor Same-m option

noclobber same-C option

noexec same-n option

noglob same-f option

nohash same-d option

notify with -b option

nounset with -u option

physical with -p option

posix change BASH attribute to match standard, default operation is different from POSIX1003 .2Standard

verbose with -v option

vi Using the vi style command line editor

XTRACE with the -x option, if no option name is given, the current Option value

-p Open privileged mode (in this mode, the $ENV file is processed and cannot be inherited from the environment

shell function. If it is a valid user ID instead of a real user group then it is automatically Start. Close

This option will enable valid user and group IDs to set real user and group IDs)

-t Exit

after reading the command and executing it -u When non-set variables are treated as errors when executing parameter bracketing (if the extension attempt

appears in a non-set variable, the shell displays an error message. If it is not interactive,

With non-impressed exit)

-v When the input line is read, the shell input line is displayed

-x After each simple command is expanded, the PS4 extension value is displayed, after which it is Executed commands

-l Save and restore the name of the binding in the command

-d Prevents the execution of the lookup hash command (usually, the command is saved in the hash table once it is found < Br>

will not continue to search)

-C effect seems to be executed noclobber=shell command

-H use! style history alternative (when the shell interacts, the default In case of case, this option is valid)

-P If this parameter is set, when the change directory command cd is executed, the symbolic link is not followed, but

using the actual directory

-- If there is no parameter after the option, the position parameter is not set. Otherwise, even if some parameters start with the a

option, set the position parameter For the argument

- the signal for the end option will cause the rest of the arguments to be assigned to the positional argument (the -x and -v

options are turned off. If there is no argument, the positional argument will remain un Changed parameters)

Copyright © Windows knowledge All Rights Reserved