1. Set-e
"Exit immediately if a simple command exits with a Non-zero status."
When this option was on, if a simple command fails for any of the reasons listed in consequences of Shell Errors or returns An exit status value >0, and was not part of the compound list following a while, until, or if keyword, and is not a PA RT of an and or or lists, and is a pipeline preceded by the! reserved word, then the shell shall immediately exit.
2. Set-o Pipefail
"If set, the return value of a pipeline is the value of the last (rightmost) command to exit with a Non-zero status,or Z Ero if all commands in the pipeline exit successfully. This option was disabled by default. "
When this option is set, the return value of the statement containing the pipe command becomes the last return value of the pipeline command that returns nonzero
3. Set-x
Show commands being executed
4. Set-u
Treat unset variables as an error when performing parameter expansion. If expansion is attempted on a unset variable, the shell prints an error message, and, if not interactive, exits wit H a Non-zero status.
5. Others
-b: Returns the aborted daemon immediately to the execution status - C: The file generated by the steering cannot overwrite the existing file -d:shell presets Use the hash table to memorize the instructions used to speed up the execution of the instruction. Use the-d parameter to cancel. -e: Exit the shell immediately if the instruction return value is not equal to 0. -f: The use of wildcards is canceled. -h: the location where the function is automatically recorded. -H Shell: can use "!" Add < instruction number >-k: The arguments given by the directive are treated as environment variables for this directive. -l: Record the variable name for the For loop. -m: Use watch mode. -n: reads only instructions, not actual execution. -p: Starts the precedence mode. -P: After starting the-p parameter, when executing the instruction, the symbolic connection is replaced with the actual file or directory. -t: Exits the shell after executing the subsequent instruction. -u: An error message is displayed when execution uses a variable that is not defined. -v: Displays the input values that the shell reads. -x: After executing the instruction, the instruction and the parameters below are displayed first.
Linux Set Command