set |
---|
|
set set -- [ arguments ... ] set [ -short-options ] [ -o long-option ] [ arguments ... ] set [ +short-options ] [ +o long-option ] [ arguments ... ] set -o set +o |
---|
|
To print the names and values of all current shell variables; to set or unset the value of shell options (which change the way that the shell behaves); and to change the values of the positional parameters. |
---|
|
See text. |
---|
|
With no options or arguments, print the names and values of all shell variables in a form that can later be reread by the shell. |
---|
With -- and arguments, replace the positional parameters with the supplied arguments. |
---|
With short-form options that begin with a -, or long-form options that begin with -o, enable particular shell options. Additional nonoption arguments set the positional parameters. See text for details. |
---|
With short-form options that begin with a +, or long-form options that begin with +o, disable particular shell options. See text for details. |
---|
A single -o prints the current settings of the shell options "in an unspecified format." ksh93 and bash both print a sorted list, where each line is an option name and the word on or off: |
---|
$ set -o From bash allexport off |
---|
A single +o prints the current settings of the shell options in a way that they may be later reread by the shell to achieve the same set of option settings. |
---|
|
Real shells have additional short and long options, above and beyond the ones described in Table 7-10. Details are given in Chapter 14. Don't use them if portability is a major concern. |
---|