November 2015
Beginner
282 pages
5h 5m
English
The set command is a shell builtin command that is used to set and unset a value of the local variables in shell.
The syntax of using set is as follows:
set [--abBCefhHkmnpPtuvx] [-o option] [arg …]
Some of the option values are allexport, braceexpand, history, keyword, verbose, and xtrace.
Using set without any option displays the name and value of all shell variables and functions, in a format that can be reused as an input for setting and unsetting the currently set variables.
In a shell script, by default, the next line is executed if an error occurs in the current line. Sometimes, we may want to stop running a script further after an error has been encountered. The -e option of set ensures ...
Read now
Unlock full access