+[-1c?
@(#)$Id: set (AT&T Research) 2013-04-25 $
]
[+NAME?set - set/unset options and positional parameters]
[+DESCRIPTION?\bset\b sets or unsets options and positional parameters.  Options that are specified with a \b-\b cause the options to be set.  Options that are specified with a \b+\b cause the option to be unset.]
[+?\bset\b without any options or arguments displays the names and values of all shell variables in the order of the collation sequence in the current locale.  The values are quoted so that they are suitable for reinput to the shell.]
[+?If no \aarg\as are specified, not even the end of options argument \b--\b, the positional parameters are unchanged.  Otherwise, unless the \b-A\b options has been specified, the positional parameters are replaced by the list of \aarg\as.  A first \aarg\a of \b--\b is ignored when setting positional parameters.]
[+?For backward compatibility, a \bset\b command without any options specified whose first \aarg\a is \b-\b will turn off the \b-v\b and \b-x\b options.  If any additional \aarg\as are specified, they will replace the positional parameters.]
[s?Sort the positional parameters.]
[A]:[name?Assign the arguments sequentially to the array named by \aname\a starting at subscript 0 rather than to the positional parameters.]
\fabc\f
[K:keys]:[keylist?When used with \b-s\b and \b-A\b and without \aarg\a, it specifes the sorting paramaters.  For compound arrays and for arrays of types it consists of a comma separated list of keys. Each key can be followed by \b:n\b for numerical sort and/or \b:r\b for reverse order.  The \b:n\b and/or \b:r\b can be used for arrays of elements.]
[06:default?Restore all non-command line options to the default settings.]
[07:state?List the current option state in the form of a \bset\b command that can be executed to restore the state.]

[arg ...]

[+EXIT STATUS?]{
[+0?No errors occurred.]
[+>0?An error occurred.]
}
[+SEE ALSO?\bdeclare\b(1), \btypeset\b(1), \bshift\b(1)]
