set - command syntax
set [options] [arguments]
In the context of the set command, [options] are
settings or flags that are set or unset in the
Bash shell environment. Use it to influence the
behavior of defined shell scripts and help execute
the desired tasks.
- Set an option by using a minus sign (-) followed by the appropriate option.
- Unset an option by using a plus sign (+) followed by the appropriate option.
Options
-m
Displays a message when a task completes.-x
Prints out command arguments during execution.-a
Marks all created or modified variables or functions for export.-e
Instructs a shell to exit if a command fails, i.e., if it outputs a non-zero exit status.-u
Treats unset or undefined variables as an error when substituting.-b
Alerts the user upon background job termination.