

set                          Command                          set




Set shell option flags and positional parameters

sseett [-cceeiikknnssttuuvvxx [_n_a_m_e ...] ] (Bourne shell)
sseett [[+-]aaeeffhhkkmmnnuuvvxx] [[+-]oo _n_a_m_e] (Korn shell)

sseett changes the options  of the current shell and optionally sets
the  values  of  positional  parameters.   This command  is  used
implemented  by both  the Bourne  and  Korn shells;  however, its
syntax and options vary from one shell to the other.

***** Bourne Shell *****

The shell  variable `$-' contains the  currently set shell flags.
If the  optional _n_a_m_e list  is given, sseett  assigns the positional
parameters $11, $22 ... to the given shell variables.

sseett recognizes the following options:

-cc _s_t_r_i_n_g
    Read shell commands from _s_t_r_i_n_g.

-ee  Exit  on any  error (command not  found or  command returning
    nonzero status) if the shell is not interactive.

-ii  The  shell  is  interactive,  even  if  the terminal  is  not
    attached to it; print  prompt strings.  For a shell reading a
    script, ignore signals SSIIGGTTEERRMM and SSIIGGIINNTT.

-kk  Place all keyword  arguments into the environment.  Normally,
    the shell places  only assignments to variables preceding the
    command into the environment.

-nn  Read commands but do not execute them.

-ss  Read commands from  the standard input and write shell output
    to the standard error.

-tt  Read and execute one command rather than the entire file.

-uu  If the  actual value of a shell variable  is blank, report an
    error rather than substituting the null string.

-vv  Print each line as it is read.

-xx  Print each command and its arguments as it is executed.

-   Cancel the -xx -vv options.

The shell executes sseett directly.

***** Korn Shell *****

sseett recognizes  the following options.  Preceding  an option with
`-' turns on the option; preceding it with `+' turns it off.


COHERENT Lexicon                                           Page 1




set                          Command                          set




-aa aalllleexxppoorrtt: Automatically export all new variables.

-ee eerrrreexxiitt: Exit from the shell when non-zero status is received.

-ff nnoogglloobb: Do not expand file names.  This globally turns off the
   special meaning of characters `*' and `?'.

-hh ttrraacckkaallll: Automatically  add all commands to  the shell's hash
   table.

-kk kkeeyywwoorrdd: Recognize variable assignments anywhere in a command.

-mm mmoonniittoorr: Enable  job control.  See the  Lexicon article on kksshh
   for details on job control and how to use it.

-nn nnooeexxeecc: Compile an input command, but do not execute it.

-oo _o_p_t_i_o_n
   Set _o_p_t_i_o_n. sseett recognizes the following _o_p_t_i_o_ns:

aalllleexxppoorrtt
        Same as -aa option, above.

eemmaaccss   Turn on MicroEMACS-style editing of command lines.

eerrrreexxiitt
        Same as -ee option, above.

iiggnnoorreeeeooff
        Tell the  shell not  to exit when  reading EOF:  must use
        eexxiitt command to exit from the shell.

kkeeyywwoorrdd
        Same as -kk option, above.

mmoonniittoorr
        Same as -mm option, above.

nnooeexxeecc  Same as -nn option, above.

nnoogglloobb  Same as -ff option, above.

ttrraacckkaallll
        Same as -hh option, above.

nnoouunnsseett
        Same as -uu option, below.

vveerrbboossee
        Same as -vv option, below.

xxttrraaccee  Same as -xx option, below.




COHERENT Lexicon                                           Page 2




set                          Command                          set



-uu nnoouunnsseett: Treat  dollar-sign expansion of an  unset variable as
   an error.

-vv vveerrbboossee: When  compiling a  command, echo its  compiled (i.e.,
   expanded) version on the standard output before executing it.

-xx xxttrraaccee: Echo simple commands while executing.

The shells execute sseett directly.

***** See Also *****

ccoommmmaannddss, kksshh, sshh












































COHERENT Lexicon                                           Page 3


