home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / dossh23.zip / sh.man < prev    next >
Text File  |  1994-08-25  |  215KB  |  3,650 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  7.  
  8.  
  9.  
  10.      NNNNAAAAMMMMEEEE
  11.           sh, rsh - shell, the standard/restricted command programming
  12.           language
  13.  
  14.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  15.           sssshhhh [ ----aaaacccceeeeffffhhhhiiiikkkknnnnmmmmrrrrssssttttuuuuvvvvxxxx0000RRRR ] [ args ]
  16.           rrrrsssshhhh [ ----aaaacccceeeeffffhhhhiiiikkkknnnnmmmmrrrrssssttttuuuuvvvvxxxx0000RRRR ] [ args ]
  17.  
  18.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.           _s_h is a command programming language that executes  commands
  20.           read from a terminal or a file.  _R_s_h is a restricted version
  21.           of the standard command interpreter _s_h; it is used to set up
  22.           login  names  and  execution environments whose capabilities
  23.           are more controlled than those of the standard  shell.   See
  24.           _I_n_v_o_c_a_t_i_o_n below for the meaning of arguments to the shell.
  25.  
  26.         DDDDeeeeffffiiiinnnniiiittttiiiioooonnnnssss
  27.           A _b_l_a_n_k is a tab or a  space.   A  _n_a_m_e  is  a  sequence  of
  28.           letters,  digits,  or underscores beginning with a letter or
  29.           underscore.  A _p_a_r_a_m_e_t_e_r is a name, a digit, or any  of  the
  30.           characters ****, @@@@, ####, ????, ----, $$$$, and !!!!.
  31.  
  32.         CCCCoooommmmmmmmaaaannnnddddssss
  33.           A _s_i_m_p_l_e-_c_o_m_m_a_n_d is a sequence of non-blank _w_o_r_d_s  separated
  34.           by _b_l_a_n_k_s.  The first word specifies the name of the command
  35.           to be executed.  Except as specified  below,  the  remaining
  36.           words  are  passed as arguments to the invoked command.  The
  37.           command name is passed as argument  0  (see  _e_x_e_c(2)).   The
  38.           _v_a_l_u_e   of  a  simple-command  is  its  exit  status  if  it
  39.           terminates normally, or (octal) 200+_s_t_a_t_u_s if it  terminates
  40.           abnormally (see _s_i_g_n_a_l(2) for a list of status values).
  41.  
  42.           A _p_i_p_e_l_i_n_e is a sequence of one or more  _c_o_m_m_a_n_d_s  separated
  43.           by |||| (or, for historical compatibility, by ^^^^).  The standard
  44.           output of each command  but  the  last  is  connected  by  a
  45.           _p_i_p_e(2)  to  the  standard  input of the next command.  Each
  46.           command is run as a separate process; the  shell  waits  for
  47.           the  last  command  to  terminate.   The  exit  status  of a
  48.           pipeline is the exit status of the last command.
  49.  
  50.           A _l_i_s_t is a sequence of one or more pipelines  separated  by
  51.           ;;;;,  &&&& (OOOOSSSS////2222 only), &&&&&&&&, or ||||||||, and optionally terminated by ;;;;
  52.           or &&&& (OOOOSSSS////2222 only).  Of these four symbols, ;;;; and &&&& have equal
  53.           precedence,  which  is  lower precedence than that of &&&&&&&& and
  54.           ||||||||.  The symbols &&&&&&&& and |||||||| also have  equal  precedence.   A
  55.           semicolon  (;;;;)  causes sequential execution of the preceding
  56.           pipeline; an ampersand (&&&&) causes asynchronous execution  of
  57.           the  preceding  pipeline  (i.e., the shell does not wait for
  58.           that command to finish.  This option is only available under
  59.           OOOOSSSS////2222  and is restricted to single commands and not pipelines
  60.           because of the differences in  the  UUUUNNNNIIIIXXXX  and  OOOOSSSS////2222  process
  61.           models).  The symbol &&&&&&&& (||||||||) causes the _l_i_s_t following it to
  62.  
  63.  
  64.  
  65.      Page 1                                          (printed 6/30/94)
  66.  
  67.  
  68.  
  69.  
  70.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  71.  
  72.  
  73.  
  74.           be executed only if the preceding pipeline  returns  a  zero
  75.           (non-zero)  exit  status.   An arbitrary number of new-lines
  76.           may appear in a _l_i_s_t,  instead  of  semicolons,  to  delimit
  77.           commands.
  78.  
  79.           A  _c_o_m_m_a_n_d  is  either  a  simple-command  or  one  of   the
  80.           following.  Unless otherwise stated, the value returned by a
  81.           command is that of the last simple-command executed  in  the
  82.           command.
  83.  
  84.           ffffoooorrrr _n_a_m_e [ iiiinnnn _w_o_r_d ... ] ddddoooo _l_i_s_t ddddoooonnnneeee
  85.                Each time a ffffoooorrrr command is executed, _n_a_m_e is set to the
  86.                next  _w_o_r_d taken from the iiiinnnn _w_o_r_d list.  If iiiinnnn _w_o_r_d ...
  87.                is omitted, then the ffffoooorrrr command executes the  ddddoooo  _l_i_s_t
  88.                once  for  each  positional  parameter that is set (see
  89.                _P_a_r_a_m_e_t_e_r _S_u_b_s_t_i_t_u_t_i_o_n  below).   Execution  ends  when
  90.                there are no more words in the list.
  91.  
  92.           sssseeeelllleeeecccctttt _n_a_m_e [ iiiinnnn _w_o_r_d ... ] ddddoooo _l_i_s_t ddddoooonnnneeee
  93.                A  sssseeeelllleeeecccctttt  command  prints  on  standard  error   (file
  94.                descriptor  2),  the  set  of _w_o_r_ds, each preceded by a
  95.                number.  If iiiinnnn _w_o_r_d ... is omitted, then the positional
  96.                parameters are used instead (see _P_a_r_a_m_e_t_e_r _S_u_b_s_t_i_t_u_t_i_o_n
  97.                below).  The PPPPSSSS3333 prompt is printed and a line  is  read
  98.                from  the standard input.  If this line consists of the
  99.                number of one of the listed _w_o_r_ds, then  the  value  of
  100.                the  parameter _n_a_m_e is set to the _w_o_r_d corresponding to
  101.                this number.  If this line is empty the selection  list
  102.                is printed again.  Otherwise the value of the parameter
  103.                _n_a_m_e is set to null.  The contents  of  the  line  read
  104.                from  standard  input  is saved in the parameter RRRREEEEPPPPLLLLYYYY.
  105.                The list is executed for each selection until  a  break
  106.                or end-of-file is encountered.
  107.  
  108.           ccccaaaasssseeee _w_o_r_d iiiinnnn [ _p_a_t_t_e_r_n [ | _p_a_t_t_e_r_n ] ... )))) _l_i_s_t ;;;;;;;; ] ... eeeessssaaaacccc
  109.                A  ccccaaaasssseeee  command  executes the _l_i_s_t associated with the
  110.                first _p_a_t_t_e_r_n that  matches  _w_o_r_d.   The  form  of  the
  111.                patterns  is  the  same  as  that  used  for  file-name
  112.                generation (see _F_i_l_e _N_a_m_e  _G_e_n_e_r_a_t_i_o_n)  except  that  a
  113.                slash,  a leading dot, or a dot immediately following a
  114.                slash need not be matched explicitly, and the match  is
  115.                case sensitive.
  116.  
  117.           iiiiffff _l_i_s_t tttthhhheeeennnn _l_i_s_t [ eeeelllliiiiffff _l_i_s_t tttthhhheeeennnn _l_i_s_t ] ... [ eeeellllsssseeee _l_i_s_t ] ffffiiii
  118.                The  _l_i_s_t following iiiiffff is executed and, if it returns a
  119.                zero exit status, the _l_i_s_t following the first tttthhhheeeennnn  is
  120.                executed.    Otherwise,  the  _l_i_s_t  following  eeeelllliiiiffff  is
  121.                executed and, if its value is zero, the _l_i_s_t  following
  122.                the next tttthhhheeeennnn is executed.  Failing that, the eeeellllsssseeee _l_i_s_t
  123.                is executed.  If no eeeellllsssseeee _l_i_s_t or tttthhhheeeennnn _l_i_s_t is executed,
  124.                then the iiiiffff command returns a zero exit status.
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 6/30/94)
  130.  
  131.  
  132.  
  133.  
  134.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  135.  
  136.  
  137.  
  138.           wwwwhhhhiiiilllleeee _l_i_s_t ddddoooo _l_i_s_t ddddoooonnnneeee
  139.                A wwwwhhhhiiiilllleeee command repeatedly executes the wwwwhhhhiiiilllleeee _l_i_s_t and,
  140.                if  the  exit status of the last command in the list is
  141.                zero,  executes  the  ddddoooo  _l_i_s_t;  otherwise   the   loop
  142.                terminates.    If  no  commands  in  the  ddddoooo  _l_i_s_t  are
  143.                executed, then the wwwwhhhhiiiilllleeee command returns  a  zero  exit
  144.                status;  uuuunnnnttttiiiillll  may be used in place of wwwwhhhhiiiilllleeee to negate
  145.                the loop termination test.
  146.  
  147.           ((((_l_i_s_t))))
  148.                Execute _l_i_s_t in a sub-shell.  The shell creates  a  new
  149.                environment  in which to execute the _l_i_s_t, but does not
  150.                fork a sub-shell as a Unix system would.  The  original
  151.                environment is restored on completion.
  152.  
  153.           {{{{ _l_i_s_t;;;; }}}}
  154.                _l_i_s_t is simply executed.
  155.  
  156.           [[[[[[[[ _e_x_p_r_e_s_s_i_o_n ]]]]]]]]
  157.                Evaluates expression and returns  a  zero  exit  status
  158.                when  expression  is true.  See CCCCoooonnnnddddiiiittttiiiioooonnnnaaaallll EEEExxxxpppprrrreeeessssssssiiiioooonnnnssss
  159.                below, for a description of expression.  Note  that  [[[[[[[[
  160.                and ]]]]]]]] are keywords and require blanks between them and
  161.                expression.
  162.  
  163.           ffffuuuunnnnccccttttiiiioooonnnn _n_a_m_e  {{{{ _l_i_s_t;;;; }}}}
  164.  
  165.           _n_a_m_e (((()))) {{{{ _l_i_s_t;;;; }}}}
  166.                Define a function which is  referenced  by  _n_a_m_e.   The
  167.                body  of the function is the _l_i_s_t of commands between {{{{
  168.                and }}}}.  Execution of functions is described below  (see
  169.                _E_x_e_c_u_t_i_o_n).
  170.  
  171.           The following words are only recognised as the first word of
  172.           a command and when not quoted:
  173.  
  174.           iiiiffff tttthhhheeeennnn eeeellllsssseeee eeeelllliiiiffff ffffiiii ccccaaaasssseeee eeeessssaaaacccc ffffoooorrrr wwwwhhhhiiiilllleeee uuuunnnnttttiiiillll ddddoooo ddddoooonnnneeee  {{{{  }}}}
  175.           [[[[[[[[ ]]]]]]]]
  176.  
  177.         CCCCoooommmmmmmmeeeennnnttttssss
  178.           A word beginning  with  ####  causes  that  word  and  all  the
  179.           following characters up to a new-line to be ignored.
  180.  
  181.         AAAAlllliiiiaaaassssiiiinnnngggg
  182.           The first word of each command is replaced by the text of an
  183.           alias if an alias for this word has been defined.  The alias
  184.           name must a valid identifier.  The  replacement  string  can
  185.           contain any valid Shell script including the meta-characters
  186.           listed above.   The  first  word  of  each  command  of  the
  187.           replaced text will not be tested for additional aliases.  If
  188.           the last character of the alias value is a  blank  then  the
  189.           word  following  the  alias  will  also be checked for alias
  190.  
  191.  
  192.  
  193.      Page 3                                          (printed 6/30/94)
  194.  
  195.  
  196.  
  197.  
  198.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  199.  
  200.  
  201.  
  202.           substitution.  Aliases  can  be  used  to  redefine  special
  203.           built-in  commands  but  cannot  be  used  to  redefine  the
  204.           keywords listed above.  Aliases can be  created  and  listed
  205.           with  the  aaaalllliiiiaaaassss command and can be removed with the uuuunnnnaaaalllliiiiaaaassss
  206.           command.
  207.  
  208.           Aliasing is performed when scripts are read, not while  they
  209.           are  executed.   Therefore,  for an alias to take effect the
  210.           alias command has to be executed before  the  command  which
  211.           references the alias is read.
  212.  
  213.           Aliases are frequently used as a short hand  for  full  path
  214.           names.   An option to the aliasing facility allows the value
  215.           of the alias to be automatically set to the full pathname of
  216.           the corresponding command.  These aliases are called tracked
  217.           aliases.  The value of a tracked alias is defined the  first
  218.           time  the  corresponding  command  is  looked up and becomes
  219.           undefined each time  the  PATH  variable  is  reset.   These
  220.           aliases remain tracked so that the next subsequent reference
  221.           will redefine the value.
  222.  
  223.         CCCCoooonnnnddddiiiittttiiiioooonnnnaaaallll EEEExxxxpppprrrreeeessssssssiiiioooonnnnssss
  224.           A conditional  expression  is  used  with  the  [[[[[[[[  compound
  225.           command  to test attributes of files and to compare strings.
  226.           Word splitting and file name generation are not performed on
  227.           the  words  between  [[[[[[[[  and  ]]]]]]]].   Each  expression  can be
  228.           constructed from one or  more  of  the  following  unary  or
  229.           binary expressions:
  230.  
  231.                ----aaaa _f_i_l_e     True if _f_i_l_e exists.
  232.  
  233.                ----bbbb _f_i_l_e     True if _f_i_l_e exists and is a block  special
  234.                            file.
  235.  
  236.                ----cccc _f_i_l_e     True if _f_i_l_e  exists  and  is  a  character
  237.                            special file.
  238.  
  239.                ----dddd _f_i_l_e     True if _f_i_l_e exists and is a directory.
  240.  
  241.                ----ffff _f_i_l_e     True if _f_i_l_e exists and is a regular file.
  242.  
  243.                ----gggg _f_i_l_e     True if _f_i_l_e exists and has its setgid  bit
  244.                            set.
  245.  
  246.                ----hhhh _f_i_l_e     True if _f_i_l_e exists and is a symbolic link.
  247.  
  248.                ----kkkk _f_i_l_e     True if _f_i_l_e exists and has its sticky  bit
  249.                            set.  Under MMMMSSSS----DDDDOOOOSSSS and OOOOSSSS////2222, the sticky bit
  250.                            is equivalent to the ARCHIVED attribute.
  251.  
  252.                ----nnnn _s_t_r_i_n_g   True if the length of _s_t_r_i_n_g is non-zero.
  253.  
  254.  
  255.  
  256.  
  257.      Page 4                                          (printed 6/30/94)
  258.  
  259.  
  260.  
  261.  
  262.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  263.  
  264.  
  265.  
  266.                ----oooo _o_p_t_i_o_n   True if the _o_p_t_i_o_n named is on.
  267.  
  268.                ----pppp _f_i_l_e     True if _f_i_l_e exists and is a  FIFO  special
  269.                            file or a pipe.
  270.  
  271.                ----rrrr _f_i_l_e     True if _f_i_l_e exists and is readable.
  272.  
  273.                ----ssss _f_i_l_e     True if _f_i_l_e exists and has a size  greater
  274.                            than zero.
  275.  
  276.                ----tttt [ _f_i_l_d_e_s ]
  277.                            True if the open file whose file descriptor
  278.                            number   is   _f_i_l_d_e_s   (1  by  default)  is
  279.                            associated with a terminal device.
  280.  
  281.                ----uuuu _f_i_l_e     True if _f_i_l_e exists and has its setuid  bit
  282.                            set.
  283.  
  284.                ----wwww _f_i_l_e     True if _f_i_l_e exists and is writable.
  285.  
  286.                ----xxxx _f_i_l_e     True if _f_i_l_e exists and is executable.   If
  287.                            _f_i_l_e  exists  and  is a directory, then the
  288.                            current process has permission to search in
  289.                            the directory.
  290.  
  291.                ----zzzz _s_t_r_i_n_g   True if the length of _s_t_r_i_n_g is zero.
  292.  
  293.                ----LLLL _f_i_l_e     True if _f_i_l_e exists and is a symbolic link.
  294.  
  295.                ----OOOO _f_i_l_e     True if _f_i_l_e exists and  is  owned  by  the
  296.                            effective  user  id of this process.  Under
  297.                            MMMMSSSS----DDDDOOOOSSSS and OOOOSSSS////2222, the UID bit is  equivalent
  298.                            to the HIDDEN attribute.
  299.  
  300.                ----GGGG _f_i_l_e     True if _f_i_l_e exists and  is  owned  by  the
  301.                            effective   user  group  of  this  process.
  302.                            Under MMMMSSSS----DDDDOOOOSSSS  and  OOOOSSSS////2222,  the  GID  bit  is
  303.                            equivalent to the SYSTEM attribute.
  304.  
  305.                ----SSSS _f_i_l_e     True if _f_i_l_e exists and is a socket.
  306.  
  307.                _f_i_l_e_1 ----nnnntttt _f_i_l_e_2
  308.                            True if file1 is newer than file2.  True if
  309.                            _f_i_l_e_1 exists and is newer than _f_i_l_e_2.
  310.  
  311.                _f_i_l_e_1 ----ooootttt _f_i_l_e_2
  312.                            True if _f_i_l_e_1  exists  and  is  older  than
  313.                            _f_i_l_e_2.
  314.  
  315.                _f_i_l_e_1 ----eeeeffff _f_i_l_e_2
  316.                            True if _f_i_l_e_1 and _f_i_l_e_2 and  refer  to  the
  317.                            same  file.   Under  MMMMSSSS----DDDDOOOOSSSS and OOOOSSSS////2222, inode
  318.  
  319.  
  320.  
  321.      Page 5                                          (printed 6/30/94)
  322.  
  323.  
  324.  
  325.  
  326.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  327.  
  328.  
  329.  
  330.                            information is not available, and the shell
  331.                            compares the absolute filenames.
  332.  
  333.                _s_1 ==== _s_2     True if strings _s_1 and _s_2 are identical.
  334.  
  335.                _s_1 !!!!==== _s_2    True  if  strings  _s_1  and   _s_2   are   _n_o_t
  336.                            identical.
  337.  
  338.                _s_1 <<<< _s_2     True if string _s_1 comes before _s_2 are based
  339.                            on the ASCII value of their characters.
  340.  
  341.                _s_1 >>>> _s_2     True if string _s_1 comes after _s_2 are  based
  342.                            on the ASCII value of their characters.
  343.  
  344.                _n_1 ----eeeeqqqq _n_2   True if _n_1 is equal to _n_2.
  345.  
  346.                _n_1 ----nnnneeee _n_2   True if _n_1 is not equal to _n_2.
  347.  
  348.                _n_1 ----lllltttt _n_2   True if _n_1 is less than to _n_2.
  349.  
  350.                _n_1 ----ggggtttt _n_2   True if _n_1 is greater than to _n_2.
  351.  
  352.                _n_1 ----lllleeee _n_2   True if _n_1 is less than or equal to _n_2.
  353.  
  354.                _n_1 ----ggggeeee _n_2   True if _n_1 is greater than or equal to _n_2.
  355.  
  356.           Not all of the above have meaning under MMMMSSSS----DDDDOOOOSSSS or OOOOSSSS////2222.   In
  357.           such  cases, the appropriate value is set (_f_a_l_s_e, except for
  358.           ----OOOO and ----GGGG).
  359.  
  360.           A  compound  expression  can  be  constructed   from   these
  361.           primitives   by  using  any  of  the  following,  listed  in
  362.           decreasing order of precedence.
  363.  
  364.                       (((( _e_x_p_r ))))
  365.                            True, if  _e_x_p_r  is  true.   Used  to  group
  366.                            expressions.
  367.  
  368.                       !!!! _e_x_p_r
  369.                            True, if _e_x_p_r is false.
  370.  
  371.                       _e_x_p_r_1 &&&&&&&& _e_x_p_r_2
  372.                            True, if _e_x_p_r_1 and _e_x_p_r_2 are both true.
  373.  
  374.                       _e_x_p_r_1 |||||||| _e_x_p_r_2
  375.                            True, if _e_x_p_r_1 or _e_x_p_r_2 is true.
  376.  
  377.         TTTTiiiillllddddeeee SSSSuuuubbbbssssttttiiiittttuuuuttttiiiioooonnnn
  378.           Each word is checked to see if it begins with an unquoted ~~~~.
  379.           If  it  is,  the  ~~~~  is  replaced  by  the value of the HHHHOOOOMMMMEEEE
  380.           parameter. A ~~~~ followed by a ++++ or ---- is replaced by the value
  381.           of the parameter PPPPWWWWDDDD and OOOOLLLLDDDDPPPPWWWWDDDD respectively.
  382.  
  383.  
  384.  
  385.      Page 6                                          (printed 6/30/94)
  386.  
  387.  
  388.  
  389.  
  390.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  391.  
  392.  
  393.  
  394.         CCCCoooommmmmmmmaaaannnndddd SSSSuuuubbbbssssttttiiiittttuuuuttttiiiioooonnnn
  395.           The standard output from a command enclosed  in  parenthesis
  396.           preceded  by  a  dollar  sign  ($$$$(((())))),  or in a pair of grave
  397.           accents (````````) may be used as part or all of a word;  trailing
  398.           new-lines are removed.  The command substitution $$$$((((ccccaaaatttt _f_i_l_e))))
  399.           can be replaced by the equivalent but faster $$$$((((<<<<_f_i_l_e)))).
  400.  
  401.         PPPPaaaarrrraaaammmmeeeetttteeeerrrr SSSSuuuubbbbssssttttiiiittttuuuuttttiiiioooonnnn
  402.           The  character  $$$$  is  used   to   introduce   substitutable
  403.           _p_a_r_a_m_e_t_e_r_s.   There  are two types of parameters, positional
  404.           and keyword.  If _p_a_r_a_m_e_t_e_r is a digit, it  is  a  positional
  405.           parameter.   Positional parameters may be assigned values by
  406.           sssseeeetttt.  Keyword parameters (also known as  variables)  may  be
  407.           assigned values by writing:
  408.  
  409.                _n_a_m_e = _v_a_l_u_e [ _n_a_m_e = _v_a_l_u_e ] ...
  410.  
  411.           Pattern-matching is not performed on _v_a_l_u_e.  There cannot be
  412.           a function and a variable with the same _n_a_m_e.
  413.  
  414.           Alternatively, named parameters can be assigned  values  and
  415.           attributes by using the typeset special command.
  416.  
  417.           $$$${{{{_p_a_r_a_m_e_t_e_r}}}}
  418.                The value, if any, of  the  _p_a_r_a_m_e_t_e_r  is  substituted.
  419.                The braces are required only when _p_a_r_a_m_e_t_e_r is followed
  420.                by a letter, digit, or underscore that  is  not  to  be
  421.                interpreted  as part of its name.  If _p_a_r_a_m_e_t_e_r is **** or
  422.                @@@@, all the positional parameters, starting with $$$$1111, are
  423.                substituted (separated by spaces).  Parameter $$$$0000 is set
  424.                from argument zero when the shell is invoked.
  425.  
  426.           $$$${{{{####_p_a_r_a_m_e_t_e_r}}}}
  427.                If _p_a_r_a_m_e_t_e_r is  ****  or  @@@@,  the  number  of  positional
  428.                parameters  is  substituted.   Otherwise, the length of
  429.                the value of the _p_a_r_a_m_e_t_e_r is substituted.
  430.  
  431.           $$$${{{{_p_a_r_a_m_e_t_e_r::::----_w_o_r_d}}}}
  432.                If _p_a_r_a_m_e_t_e_r is set and  is  non-null,  substitute  its
  433.                value; otherwise substitute _w_o_r_d.
  434.  
  435.           $$$${{{{_p_a_r_a_m_e_t_e_r::::====_w_o_r_d}}}}
  436.                If _p_a_r_a_m_e_t_e_r is not set or is null set it to _w_o_r_d;  the
  437.                value  of  the  parameter  is  substituted.  Positional
  438.                parameters may not be assigned to in this way.
  439.  
  440.           $$$${{{{_p_a_r_a_m_e_t_e_r::::????_w_o_r_d}}}}
  441.                If _p_a_r_a_m_e_t_e_r is set and  is  non-null,  substitute  its
  442.                value;  otherwise,  print _w_o_r_d and exit from the shell.
  443.                If _w_o_r_d is omitted, the message ``parameter null or not
  444.                set'' is printed.
  445.  
  446.  
  447.  
  448.  
  449.      Page 7                                          (printed 6/30/94)
  450.  
  451.  
  452.  
  453.  
  454.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  455.  
  456.  
  457.  
  458.           $$$${{{{_p_a_r_a_m_e_t_e_r::::++++_w_o_r_d}}}}
  459.                If _p_a_r_a_m_e_t_e_r is set and is non-null,  substitute  _w_o_r_d;
  460.                otherwise substitute nothing.
  461.  
  462.           $$$${{{{_p_a_r_a_m_e_t_e_r####_p_a_t_t_e_r_n}}}}
  463.           $$$${{{{_p_a_r_a_m_e_t_e_r########_p_a_t_t_e_r_n}}}}
  464.                If the Shell _p_a_t_t_e_r_n matches the beginning of the value
  465.                of  _p_a_r_a_m_e_t_e_r,  then  the value of this substitution is
  466.                the value of the _p_a_r_a_m_e_t_e_r  with  the  matched  portion
  467.                deleted;  otherwise  the  value  of  this  _p_a_r_a_m_e_t_e_r is
  468.                substituted.  In the first form the  smallest  matching
  469.                _p_a_t_t_e_r_n  is  deleted and in the latter form the largest
  470.                matching _p_a_t_t_e_r_n is deleted.
  471.  
  472.           $$$${{{{_p_a_r_a_m_e_t_e_r%%%%_p_a_t_t_e_r_n}}}}
  473.           $$$${{{{_p_a_r_a_m_e_t_e_r%%%%%%%%_p_a_t_t_e_r_n}}}}
  474.                If the Shell _p_a_t_t_e_r_n matches the end of  the  value  of
  475.                _p_a_r_a_m_e_t_e_r,  then  the value of this substitution is the
  476.                value  of  the  _p_a_r_a_m_e_t_e_r  with  the  matched   portion
  477.                deleted;  otherwise  the  value  of  this  _p_a_r_a_m_e_t_e_r is
  478.                substituted.  In the first form the  smallest  matching
  479.                _p_a_t_t_e_r_n  is  deleted and in the latter form the largest
  480.                matching _p_a_t_t_e_r_n is deleted.
  481.  
  482.           In the above, _w_o_r_d is not evaluated unless it is to be  used
  483.           as  the  substituted  string,  so  that,  in  the  following
  484.           example, ppppwwwwdddd is executed only if dddd is not set or is null:
  485.  
  486.                echo ${d:-`pwd`}
  487.  
  488.           If the colon (::::) is omitted from the above expressions,  the
  489.           shell only checks whether _p_a_r_a_m_e_t_e_r is set or not (_I_t _i_s _n_o_t
  490.           _c_l_e_a_r _w_h_a_t _t_h_i_s _m_e_a_n_s).
  491.  
  492.           The following parameters are automatically set by the shell:
  493.  
  494.                ####    The number of positional parameters in decimal.
  495.  
  496.                -    Flags supplied to the shell on  invocation  or  by
  497.                     the sssseeeetttt command.
  498.  
  499.                ????    The   decimal   value   returned   by   the   last
  500.                     synchronously executed command.
  501.  
  502.                $$$$    The process number of this shell.
  503.  
  504.                !!!!    The process number of the last background  command
  505.                     invoked.
  506.  
  507.                ____    The last argument of the previous command.
  508.  
  509.                ~~~~    The shell reserves all variables beginning with  a
  510.  
  511.  
  512.  
  513.      Page 8                                          (printed 6/30/94)
  514.  
  515.  
  516.  
  517.  
  518.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  519.  
  520.  
  521.  
  522.                     ~~~~  for  its  own  internal use and these variables
  523.                     cannot be accessed by the user.
  524.  
  525.           The following parameters are used by the shell:
  526.  
  527.                CCCCDDDDPPPPAAAATTTTHHHH
  528.                     The search path for the _c_d  command.   (Note  that
  529.                     because  a  colon  is used by MMMMSSSS----DDDDOOOOSSSS to indicate a
  530.                     drive, a semi-colon is used to separate  the  path
  531.                     names  instead  of a colon - this implies that the
  532.                     CDPATH variable must be set using single or double
  533.                     quotes to surround the value).
  534.  
  535.                CCCCOOOOLLLLUUUUMMMMNNNNSSSS
  536.                     This variable is contains the number of columns on
  537.                     the screen.
  538.  
  539.                CCCCOOOOMMMMSSSSPPPPEEEECCCC
  540.                     When the shell has to process an  MMMMSSSS----DDDDOOOOSSSS  ._b_a_t  or
  541.                     OOOOSSSS////2222  ._c_m_d  file, it expects the file indicated by
  542.                     the value of this environment variable  to  be  an
  543.                     executable  program  capable of processing the MMMMSSSS----
  544.                     DDDDOOOOSSSS ._b_a_t  or  OOOOSSSS////2222  ._c_m_d  file.   The  program  is
  545.                     invoked  with the arguments ////cccc ffffiiiilllleeee____nnnnaaaammmmeeee.  CCCCOOOOMMMMSSSSPPPPEEEECCCC
  546.                     is parsed  and  split  on  white  space  to  allow
  547.                     addition   parameters  to  be  passed  to  command
  548.                     processor.   Thus  the  default  environment  size
  549.                     could  be  set  to  1000  by  setting  to  _c_o_m_m_a_n_d
  550.                     /_e:_1_0_0_0.
  551.  
  552.                EEEEDDDDIIIITTTTOOOORRRR
  553.                     If the value of this variable ends in emacs or vi,
  554.                     and  the  VVVVIIIISSSSUUUUAAAALLLL  variable  is  not  set, then the
  555.                     corresponding option is turned on.
  556.  
  557.                EEEENNNNVVVV  If  this  parameter   is   set,   then   parameter
  558.                     substitution is performed on the value to generate
  559.                     the pathname of the script that will  be  executed
  560.                     when  the shell is invoked (See Invocation below).
  561.                     This file is typically used for alias and function
  562.                     definitions.
  563.  
  564.                EEEETTTTCCCCPPPPRRRROOOOFFFFIIIILLLLEEEE
  565.                     If this parameter is set,  it  contains  the  full
  566.                     pathname  of  the  ////eeeettttcccc////pppprrrrooooffffiiiilllleeee  script  which  is
  567.                     executed at interactive startup when the -_0 option
  568.                     is  given  to  the shell.  If the parameter is not
  569.                     set, the file ////eeeettttcccc////pppprrrrooooffffiiiilllleeee on the _r_o_o_t drive  (see
  570.                     _I_n_i_t_i_a_l_i_s_a_t_i_o_n _F_i_l_e is used.
  571.  
  572.                EEEEXXXXTTTTEEEENNNNDDDDEEEEDDDD____LLLLIIIINNNNEEEE
  573.                     This parameter pointers to a file  which  contains
  574.  
  575.  
  576.  
  577.      Page 9                                          (printed 6/30/94)
  578.  
  579.  
  580.  
  581.  
  582.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  583.  
  584.  
  585.  
  586.                     information  for the shell about how command lines
  587.                     are to be built for particular  external  programs
  588.                     and  how to convert from the format entered to the
  589.                     shell (see _C_o_m_m_a_n_d _L_i_n_e _B_u_i_l_d_i_n_g).
  590.  
  591.                FFFFCCCCEEEEDDDDIIIITTTT
  592.                     The default editor name for the fc command.
  593.  
  594.                HHHHIIIISSSSTTTTFFFFIIIILLLLEEEE
  595.                     The file where command  history  is  saved  across
  596.                     login    sessions.     The    default   value   is
  597.                     $$$$HHHHOOOOMMMMEEEE////hhhhiiiissssttttoooorrrryyyy....sssshhhh.
  598.  
  599.                HHHHIIIISSSSTTTTSSSSIIIIZZZZEEEE
  600.                     The  number  of  commands  normally   stored   for
  601.                     history, default 100.
  602.  
  603.                HHHHOOOOMMMMEEEE The default argument (home directory) for  the  _c_d
  604.                     command.
  605.  
  606.                IIIIFFFFSSSS  Internal field separators,  normally  ssssppppaaaacccceeee,  ttttaaaabbbb,
  607.                     and nnnneeeewwww----lllliiiinnnneeee.
  608.  
  609.                LLLLIIIINNNNEEEENNNNOOOO
  610.                     This variable contains the current line number  in
  611.                     the script being processed.
  612.  
  613.                LLLLIIIINNNNEEEESSSS
  614.                     This variable contains the number of lines on  the
  615.                     screen.
  616.  
  617.                MMMMAAAAIIIILLLL If this parameter is set to the  name  of  a  mail
  618.                     file  _a_n_d  the  MMMMAAAAIIIILLLLPPPPAAAATTTTHHHH parameter is not set, the
  619.                     shell informs the user of the arrival of  mail  in
  620.                     the specified file.
  621.  
  622.                MMMMAAAAIIIILLLLCCCCHHHHEEEECCCCKKKK
  623.                     This parameter specifies how  often  (in  seconds)
  624.                     the  shell  will  check for the arrival of mail in
  625.                     the  files  specified  by  the  MMMMAAAAIIIILLLLPPPPAAAATTTTHHHH  or  MMMMAAAAIIIILLLL
  626.                     parameters.   If  set  to  0, the shell will check
  627.                     before each prompt.
  628.  
  629.                MMMMAAAAIIIILLLLPPPPAAAATTTTHHHH
  630.                     A semi-colon (;;;;) separated list of file names.  If
  631.                     this  parameter is set, the shell informs the user
  632.                     of the arrival of mail in  any  of  the  specified
  633.                     files.  Each  file name can be followed by %%%% and a
  634.                     message that will be printed when the modification
  635.                     time  changes.   The  default message is "_y_o_u _h_a_v_e
  636.                     _m_a_i_l".
  637.  
  638.  
  639.  
  640.  
  641.      Page 10                                         (printed 6/30/94)
  642.  
  643.  
  644.  
  645.  
  646.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  647.  
  648.  
  649.  
  650.                OOOOLLLLDDDDPPPPWWWWDDDD
  651.                     The previous  working  directory  set  by  the  ccccdddd
  652.                     command.
  653.  
  654.                OOOOPPPPTTTTAAAARRRRGGGG
  655.                     The value of the last option argument processed by
  656.                     the ggggeeeettttooooppppttttssss special command.
  657.  
  658.                OOOOPPPPTTTTIIIINNNNDDDD
  659.                     The index of the last option argument processed by
  660.                     the ggggeeeettttooooppppttttssss special command.
  661.  
  662.                OOOOSSSSMMMMOOOODDDDEEEE
  663.                     The operating system  under  which  the  shell  is
  664.                     running (0 - MMMMSSSS----DDDDOOOOSSSS; 1 - OOOOSSSS////2222; 2 - MMMMSSSS WWWWiiiinnnnddddoooowwwwssss NNNNTTTT).
  665.  
  666.                PPPPAAAATTTTHHHH The  search  path  for  commands  (see   _E_x_e_c_u_t_i_o_n
  667.                     below).  The user may not change PPPPAAAATTTTHHHH if executing
  668.                     under _r_s_h.  (Note that because a colon is used  by
  669.                     MMMMSSSS----DDDDOOOOSSSS  to  indicate a drive, a semi-colon is used
  670.                     to separate the path names instead of  a  colon  -
  671.                     this  implies  that  the PATH variable must be set
  672.                     using single or  double  quotes  to  surround  the
  673.                     value).   The  Shell  automatically  converts Unix
  674.                     format PPPPAAAATTTTHHHH  assignments  to  MMMMSSSS----DDDDOOOOSSSS  format  when
  675.                     appropriate.   A  assignment is converted if there
  676.                     are no semi-colons, no \\\\s and one or more  colons.
  677.                     If  there  is  only  one colon, it must not be the
  678.                     second character of the new value.
  679.  
  680.                PPPPAAAATTTTHHHHEEEEXXXXTTTTSSSS
  681.                     The variable PPPPAAAATTTTHHHHEEEEXXXXTTTTSSSS contains the list  of  valid
  682.                     extensions  for  which the shell should check when
  683.                     looking for an file  to  execute.   This  variable
  684.                     allows  the  user to specify a function to execute
  685.                     if a file with an extension in PPPPAAAATTTTHHHHEEEEXXXXTTTTSSSS  is  found
  686.                     (see _F_u_n_c_t_i_o_n_s below).
  687.  
  688.                PPPPWWWWDDDD  The  present  working  directory  set  by  the  ccccdddd
  689.                     command.
  690.  
  691.                PPPPSSSS1111  Primary prompt string, by default ``$$$$ ''.
  692.  
  693.                PPPPSSSS2222  Secondary prompt string, by default ``>>>> ''.
  694.  
  695.                PPPPSSSS3333  Selection prompt string used within a select loop,
  696.                     ``####???? ''.
  697.  
  698.                PPPPSSSS4444  The  value  of  this  parameter  is  expanded  for
  699.                     parameter  substitution  and precedes each line of
  700.                     an execution trace.   If  omitted,  the  execution
  701.                     trace prompt is ``+ ''.
  702.  
  703.  
  704.  
  705.      Page 11                                         (printed 6/30/94)
  706.  
  707.  
  708.  
  709.  
  710.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  711.  
  712.  
  713.  
  714.                RRRRAAAANNNNDDDDOOOOMMMM
  715.                     Each time this parameter is referenced,  a  random
  716.                     integer  is  generated.   The  sequence  of random
  717.                     numbers can be initialised by assigning a  numeric
  718.                     value to RRRRAAAANNNNDDDDOOOOMMMM.
  719.  
  720.                RRRREEEEPPPPLLLLYYYY
  721.                     This parameter is set by the sssseeeelllleeeecccctttt statement  and
  722.                     by  the rrrreeeeaaaadddd special command when no arguments are
  723.                     supplied.
  724.  
  725.                SSSSEEEECCCCOOOONNNNDDDDSSSS
  726.                     Each time this parameter is referenced, the number
  727.                     of seconds since shell invocation is returned.  If
  728.                     this parameter is assigned a value, then the value
  729.                     returned upon reference will be the value that was
  730.                     assigned plus the  number  of  seconds  since  the
  731.                     assignment.
  732.  
  733.                SSSSHHHHEEEELLLLLLLL
  734.                     When  the  shell  is   invoked,   it   scans   the
  735.                     environment (see _E_n_v_i_r_o_n_m_e_n_t below) for this name.
  736.                     If it is found and there is an  'r'  in  the  file
  737.                     name  part  of  its  value,  the  shell  becomes a
  738.                     restricted  shell.   The  shell  also  uses   this
  739.                     variable  to  decide  which  program  to  spawn to
  740.                     interpret shell scripts (see _E_x_e_c_u_t_i_o_n below).
  741.  
  742.                SSSSHHHHMMMMOOOODDDDEEEE
  743.                     The compilation mode of shell - 16 or 32 bit.
  744.  
  745.                SSSSTTTTAAAARRRRTTTTWWWWIIIINNNNPPPP
  746.                     This variable,  set  by  the  user,  contains  the
  747.                     program  to  run to start a MS Windows application
  748.                     when the shell is running under MS  Windows.   The
  749.                     variable may contain parameters to that program as
  750.                     well.  The shell assumes that the  parameters  are
  751.                     separated by white space.  If this variable is not
  752.                     set,  the  shell  will  not   start   MS   Windows
  753.                     applications when running under MS Windows.
  754.  
  755.                VVVVIIIISSSSUUUUAAAALLLL
  756.                     If the value of this variable ends in emacs or vi,
  757.                     then the corresponding option is turned on.
  758.  
  759.                TTTTMMMMPPPP  The location of temporary  files  created  by  the
  760.                     shell.  If this variable is not defined, the Shell
  761.                     uses  the  HHHHOOOOMMMMEEEE  directory  for  temporary  files.
  762.                     Failing  that,  the  root directory of the current
  763.                     drive is used.
  764.  
  765.                WWWWIIIINNNNTTTTIIIITTTTLLLLEEEE
  766.  
  767.  
  768.  
  769.      Page 12                                         (printed 6/30/94)
  770.  
  771.  
  772.  
  773.  
  774.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  775.  
  776.  
  777.  
  778.                     Under OOOOSSSS////2222, the name of the shell's window.
  779.  
  780.           The shell gives default values to  PPPPAAAATTTTHHHH,  PPPPSSSS1111,  PPPPSSSS2222,  SSSSHHHHEEEELLLLLLLL,
  781.           HHHHOOOOMMMMEEEE and IIIIFFFFSSSS.
  782.  
  783.         AAAAlllltttteeeerrrrnnnnaaaattttiiiioooonnnn
  784.           The ccccsssshhhh  provides  a  filename  expansion  method  known  as
  785.           alternation.   This  has been added into this version of the
  786.           ksh.  When performing filename substitution, you can get the
  787.           shell  to  create  a  set  of strings for you.  For example:
  788.           _e_x_a_m_p_l{_a,_b,_c,_d,_e} will expand  to  _e_x_a_m_p_l_a  _e_x_a_m_p_l_b  _e_x_a_m_p_l_c
  789.           _e_x_a_m_p_l_d _e_x_a_m_p_l_e.  A common separated set of strings in curly
  790.           braces will be expanded into  a  set  of  strings  that  are
  791.           passed  into  the command.  The strings are not sorted.  The
  792.           set of strings may contain parameter substitutions.
  793.  
  794.         AAAArrrriiiitttthhhhmmmmeeeettttiiiicccc EEEExxxxppppaaaannnnssssiiiioooonnnn
  795.           A string of the form $$$$((((((((_e_x_p)))))))) is substituted with the  value
  796.           of  the  arithmetic expression _e_x_p.  _e_x_p is treated as if it
  797.           were within single quotes.  See AAAArrrriiiitttthhhhmmmmeeeettttiiiicccc EEEEvvvvaaaalllluuuuaaaattttiiiioooonnnn below.
  798.  
  799.         BBBBllllaaaannnnkkkk IIIInnnntttteeeerrrrpppprrrreeeettttaaaattttiiiioooonnnn
  800.           After parameter and command  substitution,  the  results  of
  801.           substitution   are  scanned  for  internal  field  separator
  802.           characters (those found in  IIIIFFFFSSSS)  and  split  into  distinct
  803.           arguments  where  such  characters are found.  Explicit null
  804.           arguments ("""""""" or '''''''') are retained.  Implicit null  arguments
  805.           (those  resulting  from  _p_a_r_a_m_e_t_e_r_s that have no values) are
  806.           removed.
  807.  
  808.         FFFFiiiilllleeee NNNNaaaammmmeeee GGGGeeeennnneeeerrrraaaattttiiiioooonnnn
  809.           Following substitution, each command _w_o_r_d is scanned for the
  810.           characters  ****,  ???? and [[[[.  If one of these characters appears
  811.           the word is regarded as a _p_a_t_t_e_r_n.   The  word  is  replaced
  812.           with   alphabetically  sorted  file  names  that  match  the
  813.           pattern.  If no file name is found that matches the pattern,
  814.           the word is left unchanged.  The character .... at the start of
  815.           a file name or immediately following a ////,  as  well  as  the
  816.           character  ////  itself,  must  be  matched  explicitly.   When
  817.           matching patterns for file names, the shell ignores the case
  818.           of  the  pattern  and the file directory entries.  Generated
  819.           file names are always in lower case (for FAT file  systems).
  820.           Under HPFS on OOOOSSSS////2222, case is preserved.
  821.  
  822.                ****    Matches any string, including the null string.
  823.  
  824.                ????    Matches any single character.
  825.  
  826.                [[[[ ............ ]]]]
  827.                     Matches any one of  the  enclosed  characters.   A
  828.                     pair  of  characters  separated  by  ---- matches any
  829.                     character lexically between the  pair,  inclusive.
  830.  
  831.  
  832.  
  833.      Page 13                                         (printed 6/30/94)
  834.  
  835.  
  836.  
  837.  
  838.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  839.  
  840.  
  841.  
  842.                     If the first character following the opening ``[''
  843.                     is a ````````!!!!'''''''' any character not enclosed is matched.
  844.  
  845.           If the shell has to open or  create  the  file  ////ddddeeeevvvv////ttttttttyyyy  or
  846.           ////ddddeeeevvvv////nnnnuuuullllllll (which are Unix special files), they are converted
  847.           to the equivalent MMMMSSSS----DDDDOOOOSSSS file names (////ddddeeeevvvv////ccccoooonnnn  and  ////ddddeeeevvvv////nnnnuuuullll
  848.           respectively).    Any   user  programs  which  could  expect
  849.           ////ddddeeeevvvv////ttttttttyyyy or ////ddddeeeevvvv////nnnnuuuullllllll as arguments must do its  own  mapping
  850.           to the MMMMSSSS----DDDDOOOOSSSS equivalents.
  851.  
  852.           The shell checks for valid FAT filenames (single dot, not at
  853.           the beginning).  Invalid dots are converted to ~~~~.  A warning
  854.           message is displayed if the shell detects  an  invalid  file
  855.           name.
  856.  
  857.         QQQQuuuuoooottttiiiinnnngggg
  858.           The following characters have a special meaning to the shell
  859.           and cause termination of a word unless quoted:
  860.  
  861.                ;;;;  &&&&  ((((  ))))  ||||  ^^^^  <<<<  >>>>  nnnneeeewwww----lllliiiinnnneeee  ssssppppaaaacccceeee  ttttaaaabbbb
  862.  
  863.           A character may be _q_u_o_t_e_d (i.e., made to stand  for  itself)
  864.           by  preceding  it  with a \\\\.  The pair \\\\nnnneeeewwww----lllliiiinnnneeee is ignored.
  865.           All characters enclosed between a pair of single quote marks
  866.           (''''''''),  except  a  single  quote,  are quoted.  Inside double
  867.           quote marks (""""""""), parameter and command substitution  occurs
  868.           and  \\\\  quotes  the  characters  \\\\,  ````,  """",  and  $$$$. """"$$$$****"""" is
  869.           equivalent to """"$$$$1111 $$$$2222 ............"""", whereas  """"$$$$@@@@""""  is  equivalent  to
  870.           """"$$$$1111"""" """"$$$$2222"""" .............
  871.  
  872.         AAAArrrriiiitttthhhhmmmmeeeettttiiiicccc EEEEvvvvaaaalllluuuuaaaattttiiiioooonnnn
  873.           An ability to perform integer arithmetic  is  provided  with
  874.           the  special  command  lllleeeetttt.  Evaluations are performed using
  875.           _l_o_n_g arithmetic.  Constants are of  the  form  _b_a_s_e#_n  where
  876.           _b_a_s_e   is  a  decimal  number  between  two  and  thirty-six
  877.           representing the arithmetic base and _n is a number  in  that
  878.           base.  If _b_a_s_e# is omitted then base 10 is used.
  879.  
  880.           An  arithmetic  expression  uses  nearly  the  same   syntax
  881.           precedence,  and  associatively  of  expression  as  C.  The
  882.           following set of operators, listed in  order  of  decreasing
  883.           precedence, have been implemented:
  884.  
  885.           - + ! ~ ++ --     unary    minus/plus,    logical     NOT,
  886.                             complement, {pre, post}{in,de}crement
  887.           &                 Logical AND
  888.           ^                 Logical XOR
  889.           |                 Logical OR
  890.           *  /  %           multiplication, division, remainder
  891.           +  -              addition, subtraction
  892.  
  893.  
  894.  
  895.  
  896.  
  897.      Page 14                                         (printed 6/30/94)
  898.  
  899.  
  900.  
  901.  
  902.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  903.  
  904.  
  905.  
  906.           << >>             Logical shift left and right
  907.           <=  >=  <  >      comparison
  908.           ==  !=            equality  inequality
  909.           &&                Logical AND
  910.           || ^^             Logical OR, XOR
  911.           ? :               Ternary operator
  912.           = += -=  *=  /=   assignment
  913.           %= &= ^= |= <<=
  914.           >>= &&= ||= ^^=
  915.  
  916.           The operators &&&&&&&&, ||||||||, &&&&&&&&==== and ||||||||==== are  short-circuiting  and
  917.           only one of the latter two expressions in a ternary operator
  918.           is evaluated.  Note the precedence of the logical  AND,  XOR
  919.           and OR operators.
  920.  
  921.           Sub-expressions in parentheses () are  evaluated  first  and
  922.           can be used to override the above precedence rules.
  923.  
  924.           Named  parameters  can  be  reference  by  name  within   an
  925.           expression without using the parameter substitution syntax.
  926.  
  927.           Since many of the arithmetic operators require  quoting,  an
  928.           alternative  form  of  the lllleeeetttt command is provided.  For any
  929.           command which begins with a ((((((((, all the characters  until  a
  930.           matching  ))))))))  are  treated  as  a  quoted  expression.  More
  931.           precisely, ((((((((............))))))))  is equivalent to lllleeeetttt """"............"""".
  932.  
  933.         PPPPrrrroooommmmppppttttiiiinnnngggg
  934.           When used interactively, the shell prompts with the value of
  935.           PPPPSSSS1111  before reading a command.  If at any time a new-line is
  936.           typed and further input is needed to complete a command, the
  937.           secondary prompt (i.e., the value of PPPPSSSS2222) is issued.
  938.  
  939.           Many people like to have the shell provide them with  useful
  940.           information in their prompt.  To accommodate this, the shell
  941.           recognises special sequences of characters in the values  of
  942.           PPPPSSSS1111 and PPPPSSSS2222, and substitutes the appropriate information for
  943.           them.  The special sequences and what they signify are:
  944.  
  945.                %%%%dddd   Place the current date, in the form  DAY  DD-MM-YY
  946.                     into the prompt.
  947.  
  948.                %%%%eeee   Place the current event number (as defined by  the
  949.                     hhhhiiiissssttttoooorrrryyyy  command)  into  the  prompt.   If history
  950.                     evaluation has been turned off (via  hhhhiiiissssttttoooorrrryyyy  ----dddd),
  951.                     no number will be substituted in (i.e. the %%%%eeee will
  952.                     be removed).
  953.  
  954.                %%%%nnnn   Place the current working drive into the prompt.
  955.  
  956.                %%%%pppp   Place  the  current  working  directory  into  the
  957.                     prompt.
  958.  
  959.  
  960.  
  961.      Page 15                                         (printed 6/30/94)
  962.  
  963.  
  964.  
  965.  
  966.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  967.  
  968.  
  969.  
  970.                %%%%tttt   Place the current time of day, in the  form  HH:MM
  971.                     into  the prompt.  The time is on a 24 hour clock,
  972.                     i.e. 1:30 in the afternoon will be 13:30.
  973.  
  974.                %%%%vvvv   Place the operating system version number, in  the
  975.                     form _O_S _n_a_m_e MM:MM into the prompt.
  976.  
  977.                %%%%%%%%   Place the character % into the prompt.
  978.  
  979.                \\\\xxxxxxxxxxxx Place the character \_x_x_x  into  the  prompt.   The
  980.                     processing of escape sequences is the same as that
  981.                     for eeeecccchhhhoooo.
  982.  
  983.           Some of these facilities are of more use than others.
  984.  
  985.         IIIInnnnppppuuuutttt////OOOOuuuuttttppppuuuutttt
  986.           Before a command is executed, its input and  output  may  be
  987.           redirected  using  a  special  notation  interpreted  by the
  988.           shell.  The following  may  appear  anywhere  in  a  simple-
  989.           command  or  may  precede  or  follow  a _c_o_m_m_a_n_d and are _n_o_t
  990.           passed on to the invoked command; substitution occurs before
  991.           _w_o_r_d or _d_i_g_i_t is used:
  992.  
  993.           <<<<wwwwoooorrrrdddd         Use  file  _w_o_r_d  as   standard   input   (file
  994.                         descriptor 0).
  995.  
  996.           >>>>wwwwoooorrrrdddd         Use  file  _w_o_r_d  as  standard   output   (file
  997.                         descriptor  1).  If the file does not exist it
  998.                         is created; otherwise, it is truncated to zero
  999.                         length.
  1000.  
  1001.           >>>>>>>>wwwwoooorrrrdddd        Use file _w_o_r_d as standard output.  If the file
  1002.                         exists  output  is  appended  to  it (by first
  1003.                         seeking to the  end-of-file);  otherwise,  the
  1004.                         file is created.
  1005.  
  1006.           <<<<<<<<[----]wwwwoooorrrrdddd     The shell input is read up to a line  that  is
  1007.                         the  same  as _w_o_r_d, or to an end-of-file.  The
  1008.                         resulting document becomes the standard input.
  1009.                         If   any  character  of  _w_o_r_d  is  quoted,  no
  1010.                         interpretation is placed upon  the  characters
  1011.                         of  the  document;  otherwise,  parameter  and
  1012.                         command  substitution   occurs,   (un-escaped)
  1013.                         \\\\nnnneeeewwww----lllliiiinnnneeee  is  ignored,  and \\\\ must be used to
  1014.                         quote the characters \\\\, $$$$, ````,  and  the  first
  1015.                         character  of  _w_o_r_d.   If ---- is appended to <<<<<<<<,
  1016.                         all leading tabs are stripped  from  _w_o_r_d  and
  1017.                         from the document.
  1018.  
  1019.           <<<<&&&&ddddiiiiggggiiiitttt       Use the file associated with  file  descriptor
  1020.                         _d_i_g_i_t  as  standard  input.  Similarly for the
  1021.                         standard output using >>>>&&&&ddddiiiiggggiiiitttt.
  1022.  
  1023.  
  1024.  
  1025.      Page 16                                         (printed 6/30/94)
  1026.  
  1027.  
  1028.  
  1029.  
  1030.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  1031.  
  1032.  
  1033.  
  1034.           <<<<&&&&----           The standard input is closed.   Similarly  for
  1035.                         the standard output using >>>>&&&&----.
  1036.  
  1037.           nnnn<<<<>>>>wwwwoooorrrrdddd       causes the file _w_o_r_d  to  be  opened  on  file
  1038.                         descriptor  _n  for  both  reading and writing.
  1039.                         The file must already exist.
  1040.  
  1041.           If any of the  above  is  preceded  by  a  digit,  the  file
  1042.           descriptor  which  will  be associated with the file is that
  1043.           specified by the digit (instead of the default 0 or 1).  For
  1044.           example:
  1045.  
  1046.                ... 2>&1
  1047.  
  1048.           associates  file  descriptor  2  with  the  file   currently
  1049.           associated with file descriptor 1.
  1050.  
  1051.           The  order  in   which   redirections   are   specified   is
  1052.           significant.   The  shell  evaluates  redirections  left-to-
  1053.           right.  For example:
  1054.  
  1055.                ... 1>_x_x_x 2>&1
  1056.  
  1057.           first associates  file  descriptor  1  with  file  _x_x_x.   It
  1058.           associates  file  descriptor 2 with the file associated with
  1059.           file descriptor 1 (i.e. _x_x_x).  If the order of  redirections
  1060.           were  reversed,  file  descriptor 2 would be associated with
  1061.           the terminal (assuming file descriptor 1 had been) and  file
  1062.           descriptor 1 would be associated with file _x_x_x .
  1063.  
  1064.           The environment for the execution of a command contains  the
  1065.           file  descriptors  of  the  invoking  shell  as  modified by
  1066.           input/output specifications.
  1067.  
  1068.           Redirection of output  is  not  allowed  in  the  restricted
  1069.           shell.
  1070.  
  1071.         EEEEnnnnvvvviiiirrrroooonnnnmmmmeeeennnntttt
  1072.           The _e_n_v_i_r_o_n_m_e_n_t (see _e_n_v_i_r_o_n(5)) is  a  list  of  name-value
  1073.           pairs  that is passed to an executed program in the same way
  1074.           as a normal argument list.  The  shell  interacts  with  the
  1075.           environment in several ways.  On invocation, the shell scans
  1076.           the environment and creates a parameter for each name found,
  1077.           giving it the corresponding value.  If the user modifies the
  1078.           value of any of these parameters or creates new  parameters,
  1079.           none  of  these  affects  the  environment unless the eeeexxxxppppoooorrrrtttt
  1080.           command is  used  to  bind  the  shell's  parameter  to  the
  1081.           environment  (see  also sssseeeetttt ----aaaa).  A parameter may be removed
  1082.           from  the  environment  with   the   uuuunnnnsssseeeetttt   command.    The
  1083.           environment seen by any executed command is thus composed of
  1084.           any unmodified name-value pairs originally inherited by  the
  1085.           shell,   minus   any   pairs  removed  by  uuuunnnnsssseeeetttt,  plus  any
  1086.  
  1087.  
  1088.  
  1089.      Page 17                                         (printed 6/30/94)
  1090.  
  1091.  
  1092.  
  1093.  
  1094.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  1095.  
  1096.  
  1097.  
  1098.           modifications or additions, all of which must  be  noted  in
  1099.           eeeexxxxppppoooorrrrtttt commands.
  1100.  
  1101.           The environment for any _s_i_m_p_l_e-_c_o_m_m_a_n_d may be  augmented  by
  1102.           prefixing  it  with  one  or more assignments to parameters.
  1103.           Thus:
  1104.  
  1105.                TERM=450 cmd args
  1106.  
  1107.           and
  1108.  
  1109.                (export TERM; TERM=450; cmd args)
  1110.  
  1111.           are  equivalent  (as  far  as  the  execution  of   _c_m_d   is
  1112.           concerned).
  1113.  
  1114.           If the ----kkkk flag is set, _a_l_l keyword arguments are  placed  in
  1115.           the  environment, even if they occur after the command name.
  1116.           The following first prints aaaa====bbbb cccc and cccc:
  1117.  
  1118.                echo a=b c
  1119.                set -k
  1120.                echo a=b c
  1121.  
  1122.         SSSSiiiiggggnnnnaaaallllssss
  1123.           The INTERRUPT and QUIT signals for an  invoked  command  are
  1124.           ignored  if  the command is followed by &&&&; otherwise signals
  1125.           have the values inherited by the shell from its parent, with
  1126.           the  exception  of  signal 11 (but see also the ttttrrrraaaapppp command
  1127.           below).
  1128.  
  1129.         CCCCoooommmmmmmmaaaannnndddd RRRReeee----eeeennnnttttrrrryyyy
  1130.           The text  of  the  last  HHHHIIIISSSSTTTTSSSSIIIIZZZZEEEE  (default:  100)  commands
  1131.           entered  from  a terminal device is saved in a _h_i_s_t_o_r_y file.
  1132.           The file $$$$HHHHOOOOMMMMEEEE////hhhhiiiissssttttoooorrrryyyy....sssshhhh is used if the  HHHHIIIISSSSTTTTFFFFIIIILLLLEEEE  variable
  1133.           is  not set.  The special command ffffcccc is used to list or edit
  1134.           a portion of this file.  The  portion  of  the  file  to  be
  1135.           edited  or listed can be selected by number or by giving the
  1136.           first character or characters  of  the  command.   A  single
  1137.           command  or  range  of commands can be specified.  If you do
  1138.           not specify an editor program as  an  argument  to  ffffcccc,  the
  1139.           value  of  the parameter FFFFCCCCEEEEDDDDIIIITTTT is used.  The edited command
  1140.           is printed and re-executed upon  leaving  the  editor.   The
  1141.           editor  name  ---- is used to skip the editing phase and to re-
  1142.           execute the command.  In this case a substitution  parameter
  1143.           of the form _o_l_d====_n_e_w can be used to modify the command before
  1144.           execution.  For example, if rrrr  is  aliased  to  ````ffffcccc  ----eeee  ----'''',
  1145.           typing  `rrrr  bbbbaaaadddd====ggggoooooooodddd  cccc' re-executes the most recent command
  1146.           that starts  with  the  letter  cccc  and  replaces  the  first
  1147.           occurrence of the string bbbbaaaadddd with the string ggggoooooooodddd.
  1148.  
  1149.         HHHHiiiissssttttoooorrrryyyy
  1150.  
  1151.  
  1152.  
  1153.      Page 18                                         (printed 6/30/94)
  1154.  
  1155.  
  1156.  
  1157.  
  1158.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  1159.  
  1160.  
  1161.  
  1162.           When reading input from  an  interactive  terminal  and  vvvviiii,
  1163.           eeeemmmmaaaaccccssss or ggggmmmmaaaaccccssss input editing mode has not been selected (see
  1164.           IIIInnnn----lllliiiinnnneeee EEEEddddiiiittttiiiinnnngggg OOOOppppttttiiiioooonnnnssss), a ``!'' at the  start  of  a  line
  1165.           signals  to  the  shell  that it should attempt to perform a
  1166.           history substitution.  A history substitution  is  a  short-
  1167.           hand  method  which  allows  the  user  to recall a previous
  1168.           command for execution or editing.  The recalled  command  is
  1169.           placed  in  the  command  line for editing or passing to the
  1170.           rest  of  the  shell  for  normal  processing.   A   history
  1171.           substitution takes the form:
  1172.  
  1173.                !!!! [ ! | _s_t_r | _n_u_m ] _t_e_r_m_i_n_a_t_o_r
  1174.  
  1175.           !!!!!!!! will place the previous  command  in  the  command  line.
  1176.           !!!!_n_u_m  will  place  the  history  command  with the specified
  1177.           number in the command line.  !!!!_s_t_r will find the most  recent
  1178.           command line that started with the characters in _s_t_r.
  1179.  
  1180.           The _t_e_r_m_i_n_a_t_o_r determines what action is performed after the
  1181.           history  line  has  been  found.   If  the  original history
  1182.           command is entered using the <<<<rrrreeeettttuuuurrrrnnnn>>>> key, the  new  command
  1183.           line  is  passed directly to the shell.  If the <<<<eeeennnndddd>>>> key is
  1184.           pressed, the new command line can be edited  in  the  manner
  1185.           described below.
  1186.  
  1187.         CCCCoooommmmmmmmaaaannnndddd LLLLiiiinnnneeee EEEEddddiiiittttiiiinnnngggg
  1188.           When reading input from  an  interactive  terminal,  certain
  1189.           keystrokes  allow  the current input line to be edited.  The
  1190.           following  keystrokes   corresponding   to   the   following
  1191.           functions  are  defined  in  the initialisation file sssshhhh....iiiinnnniiii.
  1192.           The keywords in the initialisation file  which  provide  the
  1193.           functions are listed below:
  1194.  
  1195.           RRRRiiiigggghhhhtttt
  1196.                Move the cursor right one character
  1197.  
  1198.           WWWWoooorrrrddddRRRRiiiigggghhhhtttt
  1199.                Move the cursor right one word
  1200.  
  1201.           LLLLeeeefffftttt Move the cursor left one character
  1202.  
  1203.           WWWWoooorrrrddddLLLLeeeefffftttt
  1204.                Move the cursor left one word
  1205.  
  1206.           PPPPrrrreeeevvvviiiioooouuuussss
  1207.                Get the previous command from the history file
  1208.  
  1209.           NNNNeeeexxxxtttt Get the next command from the history file
  1210.  
  1211.           IIIInnnnsssseeeerrrrtttt
  1212.                Toggle insert/overwrite mode (note  the  shape  of  the
  1213.                cursor changes to indicate the current mode)
  1214.  
  1215.  
  1216.  
  1217.      Page 19                                         (printed 6/30/94)
  1218.  
  1219.  
  1220.  
  1221.  
  1222.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  1223.  
  1224.  
  1225.  
  1226.           DDDDeeeelllleeeetttteeeeRRRRiiiigggghhhhtttt
  1227.                Delete the current character unless the  cursor  is  at
  1228.                the end of line when no action is taken
  1229.  
  1230.           SSSSttttaaaarrrrtttt
  1231.                Move the cursor to the start of the command
  1232.  
  1233.           CCCCoooommmmpppplllleeeetttteeee
  1234.                Attempt to complete the filename.  The  shell  attempts
  1235.                to  complete  the  file  name  at  the  current  cursor
  1236.                position.  The file name is delimited  by  white  space
  1237.                characters.   If  the  shell  is unable to complete the
  1238.                file name (ie no match can be found in the  appropriate
  1239.                directory),  the  bell  is  rung.  If a single match is
  1240.                found, the new file name  is  displayed.   If  multiple
  1241.                matches  are  found,  the  file name is replaced by the
  1242.                longest non-unique part of the file name and  the  bell
  1243.                is rung.
  1244.  
  1245.           EEEEnnnndddd  Move the cursor to the end of the command,  unless  the
  1246.                first  character  of  the command is a !!!!, in which case
  1247.                the appropriate history search is done.  The cursor  is
  1248.                placed at the end of the command line.
  1249.  
  1250.           FFFFlllluuuusssshhhh
  1251.                Delete to the end of the line
  1252.  
  1253.           SSSSccccaaaannnnBBBBaaaacccckkkkwwwwaaaarrrrdddd
  1254.                Search backwards from the current history  command  for
  1255.                the  next match against the last history request or the
  1256.                string currently in the command line if there has  been
  1257.                no previous history request.
  1258.  
  1259.           SSSSccccaaaannnnFFFFoooorrrreeeewwwwaaaarrrrdddd
  1260.                Search forewards from the current history  command  for
  1261.                the  next match against the last history request or the
  1262.                string currently in the command line if there has  been
  1263.                no previous history request.
  1264.  
  1265.           CCCClllleeeeaaaarrrr
  1266.                Erase the complete line.
  1267.  
  1268.           CCCClllleeeeaaaarrrrSSSSccccrrrreeeeeeeennnn
  1269.                Clears the complete  screen.   This  function  is  only
  1270.                available under OOOOSSSS////2222.
  1271.  
  1272.           DDDDiiiirrrreeeeccccttttoooorrrryyyy
  1273.                Display the  file  name  list  matching  the  partially
  1274.                entered  file name under the cursor.  If no matches are
  1275.                found  the  bell  is  rung.   To  display   the   whole
  1276.                directory, enter the directory name followed by a slash
  1277.                ////.  After the directory listing has been displayed, the
  1278.  
  1279.  
  1280.  
  1281.      Page 20                                         (printed 6/30/94)
  1282.  
  1283.  
  1284.  
  1285.  
  1286.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  1287.  
  1288.  
  1289.  
  1290.                entered command line is redisplayed.
  1291.  
  1292.           DDDDeeeelllleeeetttteeeeLLLLeeeefffftttt
  1293.                Delete the character to the left of the cursor.
  1294.  
  1295.           RRRReeeettttuuuurrrrnnnn
  1296.                Execute the command line, unless the first character of
  1297.                the  command  is  a  !!!!,  in  which case the appropriate
  1298.                history processing is done.  _T_h_i_s  _i_s  _t_h_e  _a_c_t_u_a_l  _k_e_y
  1299.                _p_r_e_s_s_e_d  _a_n_d  _c_a_n_n_o_t  _b_e _m_o_d_i_f_i_e_d _b_y _t_h_e _i_n_i_t_i_a_l_i_s_a_t_i_o_n
  1300.                _f_i_l_e.
  1301.  
  1302.           JJJJoooobbbbssss Print a list of the child processes of the shell.  This
  1303.                function is only available under OOOOSSSS////2222.
  1304.  
  1305.           TTTTrrrraaaannnnssssppppoooosssseeee
  1306.                Transpose the two characters under the cursor.
  1307.  
  1308.           QQQQuuuuooootttteeee
  1309.                Disable any special processing for the next keystroke.
  1310.  
  1311.         IIIInnnn----lllliiiinnnneeee EEEEddddiiiittttiiiinnnngggg OOOOppppttttiiiioooonnnnssss
  1312.           Normally, each command line entered from a  terminal  device
  1313.           is  simply  typed  followed by a new-line (`RETURN' or `LINE
  1314.           FEED'), see previous section.  If the vvvviiii option  is  active,
  1315.           the user can edit the command line.  To be in this edit mode
  1316.           sssseeeetttt the vvvviiii  option.   An  editing  option  is  automatically
  1317.           selected each time the VVVVIIIISSSSUUUUAAAALLLL or EEEEDDDDIIIITTTTOOOORRRR variable is assigned
  1318.           a value ending in either of these option names.
  1319.  
  1320.           The editing mode implements a  concept  where  the  user  is
  1321.           looking  through  a  window at the current line.  The window
  1322.           width is the value of CCCCOOOOLLLLUUUUMMMMNNNNSSSS if it  is  defined,  otherwise
  1323.           _8_0.   If the line is longer than the window width minus two,
  1324.           a mark is displayed at the end of the window to  notify  the
  1325.           user.  As the cursor moves and reaches the window boundaries
  1326.           the window will be centred about the cursor.  The mark is  a
  1327.           >>>>  (<<<<,  ****)  if  the  line  extends on the right (left, both)
  1328.           side(s) of the window.
  1329.  
  1330.           The search commands in each edit mode provide access to  the
  1331.           history  file.   Only  strings  are  matched,  not patterns,
  1332.           although a leading ^^^^ in the string restricts  the  match  to
  1333.           begin at the first character in the line.
  1334.  
  1335.         VVVViiii EEEEddddiiiittttiiiinnnngggg MMMMooooddddeeee
  1336.           There are two typing modes.  Initially,  when  you  enter  a
  1337.           command you are in the input mode.  To edit, the user enters
  1338.           control mode by typing ESC (\\\\000033333333) and moves  the  cursor  to
  1339.           the  point  needing  correction  and then inserts or deletes
  1340.           characters or words as needed.  Most control commands accept
  1341.           an optional repeat count prior to the command.
  1342.  
  1343.  
  1344.  
  1345.      Page 21                                         (printed 6/30/94)
  1346.  
  1347.  
  1348.  
  1349.  
  1350.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  1351.  
  1352.  
  1353.  
  1354.           In edit mode, the key mappings defined in the initialisation
  1355.           file are mapped onto the appropriate vvvviiii edit command.
  1356.  
  1357.           IIIInnnnppppuuuutttt EEEEddddiiiitttt CCCCoooommmmmmmmaaaannnnddddssss
  1358.  
  1359.           By default the editor is in input mode.
  1360.  
  1361.                _b_a_c_k_s_p_a_c_e
  1362.                     Deletes previous character.
  1363.  
  1364.                CCCCttttrrrrllll----WWWW
  1365.                     Deletes the previous blank separated word.
  1366.  
  1367.                CCCCttttrrrrllll----DDDD
  1368.                     Terminates the shell.
  1369.  
  1370.                CCCCttttrrrrllll----VVVV
  1371.                     Escapes the next  character.   Editing  characters
  1372.                     can  be  entered  in a command line or in a search
  1373.                     string  if  preceded  by  a  CCCCttttrrrrllll----VVVV.   The  CCCCttttrrrrllll----VVVV
  1374.                     removes  the next character's editing features (if
  1375.                     any).
  1376.  
  1377.                \\\\    Escapes the next _e_d_i_t_i_n_g character.
  1378.  
  1379.           MMMMoooottttiiiioooonnnn EEEEddddiiiitttt CCCCoooommmmmmmmaaaannnnddddssss
  1380.  
  1381.           These commands move the cursor:
  1382.  
  1383.                [_C_o_u_n_t]llll
  1384.                     Moves the cursor forward (right) one character.
  1385.  
  1386.                [_C_o_u_n_t]wwww
  1387.                     Moves the cursor forward one alphanumeric word.
  1388.  
  1389.                [_C_o_u_n_t]WWWW
  1390.                     Moves the cursor to the beginning of the next word
  1391.                     that follows a blank.
  1392.  
  1393.                [_C_o_u_n_t]eeee
  1394.                     Moves the cursor to end of the current word.
  1395.  
  1396.                [_C_o_u_n_t]EEEE
  1397.                     Moves the cursor to  end  of  the  current  blank-
  1398.                     separated word.
  1399.  
  1400.                [_C_o_u_n_t]hhhh
  1401.                     Moves the cursor backward (left) one character.
  1402.  
  1403.                [_C_o_u_n_t]bbbb
  1404.                     Moves the cursor backward one word.
  1405.  
  1406.  
  1407.  
  1408.  
  1409.      Page 22                                         (printed 6/30/94)
  1410.  
  1411.  
  1412.  
  1413.  
  1414.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  1415.  
  1416.  
  1417.  
  1418.                [_C_o_u_n_t]BBBB
  1419.                     Moves the cursor to the  previous  blank-separated
  1420.                     word.
  1421.  
  1422.                [_C_o_u_n_t]||||
  1423.                     Moves the cursor to the column  specified  by  the
  1424.                     _c_o_u_n_t parameter.
  1425.  
  1426.                [_C_o_u_n_t]ffffcccc
  1427.                     Finds the next character _c in the current line.
  1428.  
  1429.                [_C_o_u_n_t]FFFFcccc
  1430.                     Finds the previous  character  _c  in  the  current
  1431.                     line.
  1432.  
  1433.                [_C_o_u_n_t]ttttcccc
  1434.                     Equivalent to ffff followed by hhhh.
  1435.  
  1436.                [_C_o_u_n_t]TTTTcccc
  1437.                     Equivalent to FFFF followed by llll.
  1438.  
  1439.                [_C_o_u_n_t];;;;
  1440.                     Repeats for the number of times specified  by  the
  1441.                     _c_o_u_n_t  parameter  the  last  single-character find
  1442.                     command: ffff, FFFF, tttt, or TTTT.
  1443.  
  1444.                [_C_o_u_n_t],,,,
  1445.                     Reverses the last  single-character  find  command
  1446.                     the   number  of  times  specified  by  the  _c_o_u_n_t
  1447.                     parameter.
  1448.  
  1449.                0000    Moves the cursor to start of line.
  1450.  
  1451.                ^^^^    Moves the cursor to first non-blank  character  in
  1452.                     line.
  1453.  
  1454.                $$$$    Moves the cursor to end of line.
  1455.  
  1456.           SSSSeeeeaaaarrrrcccchhhh EEEEddddiiiitttt CCCCoooommmmmmmmaaaannnnddddssss
  1457.  
  1458.           These commands access your command history:
  1459.  
  1460.                [_C_o_u_n_t]kkkk
  1461.                     Fetches the previous  command.   Each  time  kkkk  is
  1462.                     entered, the previous command is accessed.
  1463.  
  1464.                [_C_o_u_n_t]----
  1465.                     Equivalent to kkkk.
  1466.  
  1467.                [_C_o_u_n_t]jjjj
  1468.                     Fetches the next command.  Each time jjjj is entered,
  1469.                     the next command is accessed.
  1470.  
  1471.  
  1472.  
  1473.      Page 23                                         (printed 6/30/94)
  1474.  
  1475.  
  1476.  
  1477.  
  1478.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  1479.  
  1480.  
  1481.  
  1482.                [_C_o_u_n_t]++++
  1483.                     Equivalent to jjjj.
  1484.  
  1485.                [_C_o_u_n_t]GGGG
  1486.                     Fetches the command whose number is  specified  by
  1487.                     the  _c_o_u_n_t  parameter.   The  default is the least
  1488.                     recent history command.
  1489.  
  1490.                ////_S_t_r_i_n_g
  1491.                     Searches backward through history for  a  previous
  1492.                     command  containing  the  specified  _s_t_r_i_n_g.   The
  1493.                     _s_t_r_i_n_g is  terminated  by  a  RETURN  or  new-line
  1494.                     character.  If the specified string is preceded by
  1495.                     a ^^^^ (caret), the  matched  line  must  begin  with
  1496.                     _s_t_r_i_n_g.   If  the value of the _s_t_r_i_n_g parameter is
  1497.                     null, the previous string is used.
  1498.  
  1499.                ????_S_t_r_i_n_g
  1500.                     Same as ////_S_t_r_i_n_g except that the search is  in  the
  1501.                     forward direction.
  1502.  
  1503.                nnnn    Searches for the next match of the last pattern to
  1504.                     //// or ???? commands.
  1505.  
  1506.                NNNN    Searches for the next match of the last pattern to
  1507.                     ////  or  ????  commands, but in the opposite direction.
  1508.                     Searches history for the  _s_t_r_i_n_g  entered  by  the
  1509.                     previous //// command.
  1510.  
  1511.           TTTTeeeexxxxtttt MMMMooooddddiiiiffffiiiiccccaaaattttiiiioooonnnn EEEEddddiiiitttt CCCCoooommmmmmmmaaaannnnddddssss
  1512.  
  1513.           These commands modify the line:
  1514.  
  1515.                aaaa    Enters the input mode and enters  text  after  the
  1516.                     current character.
  1517.  
  1518.                AAAA    Appends text to the end of the  line.   Equivalent
  1519.                     to $$$$aaaa.
  1520.  
  1521.                [_C_o_u_n_t]cccc_M_o_t_i_o_n
  1522.                cccc[_C_o_u_n_t]_M_o_t_i_o_n
  1523.                     Deletes  the   current   character   through   the
  1524.                     character  to which the _m_o_t_i_o_n parameter specifies
  1525.                     to move the cursor, and enters input mode.  If the
  1526.                     value  of  the  _m_o_t_i_o_n  parameter is cccc, the entire
  1527.                     line is deleted and the input mode is entered.
  1528.  
  1529.                CCCC    Deletes the current character through the  end  of
  1530.                     the line and enters input mode.  Equivalent to cccc$$$$.
  1531.  
  1532.                SSSS    Equivalent to cccccccc.
  1533.  
  1534.  
  1535.  
  1536.  
  1537.      Page 24                                         (printed 6/30/94)
  1538.  
  1539.  
  1540.  
  1541.  
  1542.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  1543.  
  1544.  
  1545.  
  1546.                DDDD    Deletes the current character through the  end  of
  1547.                     line.  Equivalent to dddd$$$$.
  1548.  
  1549.                [_C_o_u_n_t]dddd_M_o_t_i_o_n
  1550.                dddd[_C_o_u_n_t]_M_o_t_i_o_n
  1551.                     Deletes the current character up to and  including
  1552.                     the  character  specified by the _m_o_t_i_o_n parameter.
  1553.                     If _m_o_t_i_o_n is dddd, the entire line is deleted.
  1554.  
  1555.                iiii    Enters the input mode and inserts text before  the
  1556.                     current character.
  1557.  
  1558.                IIII    Inserts text before the  beginning  of  the  line.
  1559.                     Equivalent to 0000iiii.
  1560.  
  1561.                [_C_o_u_n_t]PPPP
  1562.                     Places the previous text modification  before  the
  1563.                     cursor.
  1564.  
  1565.                [_C_o_u_n_t]pppp
  1566.                     Places the previous text  modification  after  the
  1567.                     cursor.
  1568.  
  1569.                RRRR    Enters  the  input  mode  and   types   over   the
  1570.                     characters on the screen.
  1571.  
  1572.                [_C_o_u_n_t]rrrr_c
  1573.                     Replaces the number of characters specified by the
  1574.                     _c_o_u_n_t  parameter,  starting  at the current cursor
  1575.                     position, with the characters specified by  the  _c
  1576.                     variable.    Advances   the   cursor   after   the
  1577.                     characters are replaced.
  1578.  
  1579.                [_C_o_u_n_t]xxxx
  1580.                     Deletes the current character.
  1581.  
  1582.                [_C_o_u_n_t]XXXX
  1583.                     Deletes the preceding character.
  1584.  
  1585.                [_C_o_u_n_t]....
  1586.                     Repeats the previous text modification command.
  1587.  
  1588.                [_C_o_u_n_t]~~~~
  1589.                     Inverts the  case  of  the  number  of  characters
  1590.                     specified  by the _c_o_u_n_t parameter, starting at the
  1591.                     current cursor position, and advances the cursor.
  1592.  
  1593.                [_C_o_u_n_t]____
  1594.                     Causes the word specified by the  _c_o_u_n_t  parameter
  1595.                     word  of  the previous command to be appended, and
  1596.                     enters input mode.  The last word is used  if  the
  1597.                     _c_o_u_n_t parameter is omitted.
  1598.  
  1599.  
  1600.  
  1601.      Page 25                                         (printed 6/30/94)
  1602.  
  1603.  
  1604.  
  1605.  
  1606.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  1607.  
  1608.  
  1609.  
  1610.                ****    Appends an **** (asterisk) to the  current  word  and
  1611.                     attempts  filename  substitution.   If no match is
  1612.                     found, it rings the bell.  Otherwise, the word  is
  1613.                     replaced by the matching pattern and input mode is
  1614.                     entered.
  1615.  
  1616.                \\\\    File-name completion.  Replaces the  current  word
  1617.                     with  the  longest common prefix of all file names
  1618.                     matching  the  current  word  with   an   asterisk
  1619.                     appended.   If the match is unique, a //// (slash) is
  1620.                     appended if the file is a directory and a space is
  1621.                     appended if the file is not a directory.
  1622.  
  1623.           OOOOtttthhhheeeerrrr EEEEddddiiiitttt CCCCoooommmmmmmmaaaannnnddddssss
  1624.  
  1625.           Other miscellaneous edit commands include:
  1626.  
  1627.                [_C_o_u_n_t]yyyy_M_o_t_i_o_n
  1628.                yyyy[_C_o_u_n_t]_M_o_t_i_o_n
  1629.                     Yanks the current character through the  character
  1630.                     to  which  the  _m_o_t_i_o_n parameter specifies to move
  1631.                     the cursor and  puts  these  characters  into  the
  1632.                     delete buffer.  The text and cursor are unchanged.
  1633.  
  1634.                YYYY    Yanks from the current position to the end of  the
  1635.                     line.  Equivalent to yyyy$$$$.
  1636.  
  1637.                uuuu    Undoes the last text-modifying command.
  1638.  
  1639.                UUUU    Undoes all the text-modifying  commands  performed
  1640.                     on the line.
  1641.  
  1642.                [_C_o_u_n_t]vvvv
  1643.                     Returns the command ffffcccc ----eeee $$$${{{{VVVVIIIISSSSUUUUAAAALLLL::::----$$$${{{{EEEEDDDDIIIITTTTOOOORRRR::::----vvvviiii}}}}}}}}
  1644.                     _c_o_u_n_t in the input buffer.  If the _c_o_u_n_t parameter
  1645.                     is omitted, then the current line is used.
  1646.  
  1647.                CCCCttttrrrrllll----LLLL
  1648.                     Line-feeds  and  prints  the  current  line.   Has
  1649.                     effect only in control mode.
  1650.  
  1651.                CCCCttttrrrrllll----JJJJ
  1652.                     (New line) Executes the current  line,  regardless
  1653.                     of the mode.
  1654.  
  1655.                CCCCttttrrrrllll----MMMM
  1656.                     (Return) Executes the current line, regardless  of
  1657.                     the mode.
  1658.  
  1659.                ####    Sends the line after inserting a #### (hash sign)  in
  1660.                     front of the line.  Useful for causing the current
  1661.                     line to be inserted in the history  without  being
  1662.  
  1663.  
  1664.  
  1665.      Page 26                                         (printed 6/30/94)
  1666.  
  1667.  
  1668.  
  1669.  
  1670.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  1671.  
  1672.  
  1673.  
  1674.                     executed.
  1675.  
  1676.                ====    Lists the file names that match the  current  word
  1677.                     as if an asterisk were appended to it.
  1678.  
  1679.                @@@@LLLLeeeetttttttteeeerrrr
  1680.                     Searches  the  alias  list  for  an  alias   named
  1681.                     _Letter.  If an alias of this name is defined, its
  1682.                     value  is  placed  into  the   input   queue   for
  1683.                     processing.
  1684.  
  1685.         EEEEMMMMAAAACCCCSSSS EEEEddddiiiittttiiiinnnngggg MMMMooooddddeeee
  1686.           When the eeeemmmmaaaaccccssss option is set, interactive input line editing
  1687.           is  enabled.  This mode is slightly different from the emacs
  1688.           mode in AT&T's KornShell.   In  this  mode  various  _e_d_i_t_i_n_g
  1689.           _c_o_m_m_a_n_d_s (typically bound to one or more control characters)
  1690.           cause immediate actions  without  waiting  for  a  new-line.
  1691.           Several  _e_d_i_t_i_n_g  _c_o_m_m_a_n_d_s  are  bound to particular control
  1692.           characters when the shell is invoked; these bindings can  be
  1693.           changed using the bbbbiiiinnnndddd command.
  1694.  
  1695.           The following _e_d_i_t_i_n_g _c_o_m_m_a_n_d_s are available, where a  caret
  1696.           indicates  the  control  character,  and ^[ is the ASCII ESC
  1697.           character.  Note that _e_d_i_t_i_n_g _c_o_m_m_a_n_d names  are  used  only
  1698.           with  the bbbbiiiinnnndddd command.  The default bindings were chosen to
  1699.           resemble corresponding EMACS key bindings.
  1700.  
  1701.           ___________________________________________________________________________________________________________
  1702.           Editing command           Default                  Function
  1703.           ___________________________________________________________________________________________________________
  1704.           pppprrrreeeeffffiiiixxxx----3333                  0xE0                     Introduces a 2-character command sequence.  This  prefix
  1705.                                                              allows  the  user to map PC function keys onto commands.
  1706.                                                              The second character is the IBM scan code value  of  the
  1707.                                                              function key to be assigned.  For example: _F_1 has a scan
  1708.                                                              code of ;;;;; _C_t_r_l-_F_1 has a scan code of ^^^^; _S_h_i_f_t-_F_1 has  a
  1709.                                                              scan code of TTTT; _A_l_t-_F_1 has a scan code of hhhh.
  1710.           bbbbeeeeggggiiiinnnnnnnniiiinnnngggg----ooooffff----lllliiiinnnneeee         Ctrl-A                   Moves the cursor to start of line.
  1711.           bbbbaaaacccckkkkwwwwaaaarrrrdddd----cccchhhhaaaarrrr             Ctrl-B                   Moves the cursor backward (left) one character.
  1712.           eeeeooootttt----oooorrrr----ddddeeeelllleeeetttteeee             Ctrl-D                   Acts as  _e_n_d-_o_f-_f_i_l_e  if  alone  on  a  line;  otherwise
  1713.                                                              deletes current character.
  1714.           eeeennnndddd----ooooffff----lllliiiinnnneeee               Ctrl-E                   Moves the cursor to end of line.
  1715.           ffffoooorrrrwwwwaaaarrrrdddd----cccchhhhaaaarrrr              Ctrl-F                   Moves the cursor forward one position.
  1716.           aaaabbbboooorrrrtttt                     Ctrl-G                   Useful as a response to a request for  a  sssseeeeaaaarrrrcccchhhh----hhhhiiiissssttttoooorrrryyyy
  1717.                                                              pattern in order to abort the search.
  1718.           ddddeeeelllleeeetttteeee----cccchhhhaaaarrrr----bbbbaaaacccckkkkwwwwaaaarrrrdddd      Ctrl-H                   Deletes the previous character.
  1719.           nnnneeeewwwwlllliiiinnnneeee                   Ctrl-M                   Executes the current line.
  1720.                                     Ctrl-J
  1721.           kkkkiiiillllllll----ttttoooo----eeeeoooollll               Ctrl-K                   Deletes from the cursor to the  end  of  the  line.   If
  1722.                                                              preceded  by  a  numerical parameter whose value is less
  1723.                                                              than the current cursor position, this  editing  command
  1724.                                                              deletes  from  the  given position up to the cursor.  If
  1725.  
  1726.  
  1727.  
  1728.  
  1729.      Page 27                                         (printed 6/30/94)
  1730.  
  1731.  
  1732.  
  1733.  
  1734.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  1735.  
  1736.  
  1737.  
  1738.                                                         preceded by a numerical parameter whose value is greater
  1739.                                                         than  the  current cursor position, this editing command
  1740.                                                         deletes from the cursor up to given cursor position.
  1741.      rrrreeeeddddrrrraaaawwww                    Ctrl-L                   Line-feeds and print the current line.
  1742.      ddddoooowwwwnnnn----hhhhiiiissssttttoooorrrryyyy              Ctrl-N                   Fetches the next command  line.   Each  time  Ctrl-N  is
  1743.                                                         entered,  the  next  command  line  forward  in  time is
  1744.                                                         accessed.
  1745.      ooooppppeeeerrrraaaatttteeee                   Ctrl-O                   Executes the current line  and  fetches  the  next  line
  1746.                                                         relative to the current line from the history file.
  1747.      uuuupppp----hhhhiiiissssttttoooorrrryyyy                Ctrl-P                   Fetches the  previous  command.   Each  time  CCCCttttrrrrllll----PPPP  is
  1748.                                                         entered,  the previous command back in time is accessed.
  1749.                                                         Moves back one line when not on  the  first  line  of  a
  1750.                                                         multiple line command.
  1751.      sssseeeeaaaarrrrcccchhhh----hhhhiiiissssttttoooorrrryyyy            Ctrl-R _S_t_r_i_n_g            Reverses search history  for  a  previous  command  line
  1752.                                                         containing the string specified by the SSSSttttrrrriiiinnnngggg parameter.
  1753.                                                         If a value of zero is given, the search is forward.  The
  1754.                                                         specified  ssssttttrrrriiiinnnngggg  is terminated by an _E_n_t_e_r or _n_e_w-_l_i_n_e
  1755.                                                         character.  If the ssssttttrrrriiiinnnngggg is  preceded  by  a  ^^^^  (caret
  1756.                                                         character), the matched line must begin with SSSSttttrrrriiiinnnngggg.  If
  1757.                                                         the SSSSttttrrrriiiinnnngggg parameter is omitted, then the  next  command
  1758.                                                         line  containing the most recent SSSSttttrrrriiiinnnngggg is accessed.  In
  1759.                                                         this case, a value of zero reverses the direction of the
  1760.                                                         search.
  1761.      ttttrrrraaaannnnssssppppoooosssseeee----cccchhhhaaaarrrrssss           Ctrl-T                   Transposes the current character with the next character
  1762.                                                         in  eeeemmmmaaaaccccssss  mode.  Transposes the two previous characters
  1763.                                                         in ggggmmmmaaaaccccssss mode.
  1764.      kkkkiiiillllllll----lllliiiinnnneeee                 Ctrl-U                   Deletes the entire input line.
  1765.      kkkkiiiillllllll----rrrreeeeggggiiiioooonnnn               Ctrl-W                   Kills from the cursor to the mark.
  1766.      pppprrrreeeeffffiiiixxxx----2222                  Ctrl-X                   Introduces a 2-character command sequence.
  1767.      ppppoooopppp----tttteeeexxxxtttt                  Ctrl-Y                   Restores the last item removed from  line.   (Yanks  the
  1768.                                                         item back to the line.)
  1769.      sssseeeeaaaarrrrcccchhhh----cccchhhhaaaarrrr----ffffoooorrrrwwwwaaaarrrrdddd       Ctrl-] _c                 Moves the cursor forward on  the  current  line  to  the
  1770.                                                         indicated character.
  1771.      sssseeeeaaaarrrrcccchhhh----cccchhhhaaaarrrr----bbbbaaaacccckkkkwwwwaaaarrrrdddd      _P_r_e_f_i_x-_1 Ctrl-] _c        Search backwards  in  the  current  line  for  the  next
  1772.                                                         keyboard  character.   Moves the cursor backwards on the
  1773.                                                         current line to the indicated character.
  1774.      qqqquuuuooootttteeee                     Ctrl-^                   Escapes the next character.  Editing characters  can  be
  1775.                                \                        entered  in  a  command  line  or  in a search string if
  1776.                                                         preceded by a _q_u_o_t_e command.   The  escape  removes  the
  1777.                                                         next character's editing features, if any.
  1778.      eeeeooootttt                       Ctrl-_                   Acts as an end-of-file.
  1779.      ccccoooommmmmmmmeeeennnntttt----eeeexxxxeeeeccccuuuutttteeee           _P_r_e_f_i_x-_1 #               Inserts a #### (pound sign) at the beginning  of  the  line
  1780.                                                         and  then execute the line.  This causes a comment to be
  1781.                                                         inserted in the history file.
  1782.      ccccoooommmmpppplllleeeetttteeee----lllliiiisssstttt             _P_r_e_f_i_x-_1 *               Attempts file name substitution on the current word.  An
  1783.                                                         asterisk  is appended if the word doesn't match any file
  1784.                                                         or contain any special pattern characters.
  1785.      pppprrrreeeevvvv----hhhhiiiisssstttt----wwwwoooorrrrdddd            _P_r_e_f_i_x-_1 .               Inserts on the  line  the  last  word  of  the  previous
  1786.      ccccooooppppyyyy----llllaaaasssstttt----aaaarrrrgggg             _P_r_e_f_i_x-_1 _               command.   If preceded by a numeric parameter, the value
  1787.                                                         of this parameter determines which word to insert rather
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.      Page 28                                         (printed 6/30/94)
  1794.  
  1795.  
  1796.  
  1797.  
  1798.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  1799.  
  1800.  
  1801.  
  1802.                                                         than  the last word.  Note I/O redirections do not count
  1803.                                                         as words of the command.
  1804.      bbbbeeeeggggiiiinnnnnnnniiiinnnngggg----ooooffff----hhhhiiiissssttttoooorrrryyyy      _P_r_e_f_i_x-_1 <               Fetches the least recent (oldest) history line.
  1805.      lllliiiisssstttt                      _P_r_e_f_i_x-_1 =               Prints a sorted, columnated list of file names (if  any)
  1806.                                                         that  can  complete  the  partial  word  containing  the
  1807.                                                         cursor.  Directory names have //// post-pended to them, and
  1808.                                                         executable file names are followed by ****.
  1809.      eeeennnndddd----ooooffff----hhhhiiiissssttttoooorrrryyyy            _P_r_e_f_i_x-_1 >               Fetches the most recent (youngest) history line.
  1810.      bbbbaaaacccckkkkwwwwaaaarrrrdddd----wwwwoooorrrrdddd             _P_r_e_f_i_x-_1 B               Moves the cursor backward one word.
  1811.      ccccaaaappppiiiittttaaaalllliiiisssseeee----wwwwoooorrrrdddd           _P_r_e_f_i_x-_1 C               Capitalises the current word.
  1812.      ddddeeeelllleeeetttteeee----wwwwoooorrrrdddd----bbbbaaaacccckkkkwwwwaaaarrrrdddd      _P_r_e_f_i_x-_1 Ctrl-H          Deletes the previous word.
  1813.                                _P_r_e_f_i_x-_1 H
  1814.      ddddeeeelllleeeetttteeee----wwwwoooorrrrdddd----ffffoooorrrrwwwwaaaarrrrdddd       _P_r_e_f_i_x-_1 D               Deletes the current word.
  1815.      pppprrrreeeeffffiiiixxxx----1111                  ESC                      Introduces  a  2-character  command   sequence.    Three
  1816.                                                         introducers are available.
  1817.      ccccoooommmmpppplllleeeetttteeee                  _P_r_e_f_i_x-_1 ESC             File-name completion.  Replaces the  current  word  with
  1818.                                                         the  longest  common prefix of all file names that match
  1819.                                                         the current word with  an  asterisk  appended.   If  the
  1820.                                                         match  is unique, a //// (slash) is appended if the file is
  1821.                                                         a directory and a space is appended if the file is not a
  1822.                                                         directory.
  1823.      ffffoooorrrrwwwwaaaarrrrdddd----wwwwoooorrrrdddd              _P_r_e_f_i_x-_1 F               Moves  the  cursor  forward  one  word  (a   string   of
  1824.                                                         characters  consisting  of  only  letters,  digits,  and
  1825.                                                         underscores).
  1826.      ddddoooowwwwnnnnccccaaaasssseeee----wwwwoooorrrrdddd             _P_r_e_f_i_x-_1 L               Changes the current word to lowercase.
  1827.      mmmmuuuullllttttiiiippppllllyyyy                  _P_r_e_f_i_x-_1 M               Multiplies the parameter of the next command by 4.
  1828.      uuuuppppccccaaaasssseeee----wwwwoooorrrrdddd               _P_r_e_f_i_x-_1 U               Change the current word to upper-case.
  1829.                                _P_r_e_f_i_x-_1 DDDDiiiiggggiiiittttssss          Defines the numeric parameter.  The ddddiiiiggggiiiittttssss are taken  as
  1830.                                                         a  parameter  to  the  next  command.  The commands that
  1831.                                                         accept  a  parameter  are  _f_o_r_w_a_r_d-_c_h_a_r,  _b_a_c_k_w_a_r_d-_c_h_a_r,
  1832.                                                         _b_a_c_k_w_a_r_d-_w_o_r_d,     _f_o_r_w_a_r_d-_w_o_r_d,    _d_e_l_e_t_e-_w_o_r_d-_f_o_r_w_a_r_d,
  1833.                                                         _d_e_l_e_t_e-_c_h_a_r-_f_o_r_w_a_r_d, _d_e_l_e_t_e-_w_o_r_d-_b_a_c_k_w_a_r_d,  _d_e_l_e_t_e-_c_h_a_r-
  1834.                                                         _b_a_c_k_w_a_r_d,   _p_r_e_v-_h_i_s_t-_w_o_r_d,  _c_o_p_y-_l_a_s_t-_a_r_g,  _u_p-_h_i_s_t_o_r_y,
  1835.                                                         _d_o_w_n-_h_i_s_t_o_r_y,  _s_e_a_r_c_h-_h_i_s_t_o_r_y,  _u_p_c_a_s_e-_w_o_r_d,   _d_o_w_n_c_a_s_e-
  1836.                                                         _w_o_r_d,   _c_a_p_i_t_a_l_i_s_e-_w_o_r_d,   _u_p_c_a_s_e-_c_h_a_r,   _d_o_w_n_c_a_s_e-_c_h_a_r,
  1837.                                                         _c_a_p_i_t_a_l_i_s_e-_c_h_a_r,  _k_i_l_l-_t_o-_e_o_l,  _s_e_a_r_c_h-_c_h_a_r-_f_o_r_w_a_r_d  and
  1838.                                                         _s_e_a_r_c_h-_c_h_a_r-_b_a_c_k_w_a_r_d.
  1839.      ccccaaaappppiiiittttaaaalllliiiisssseeee----cccchhhhaaaarrrr           _P_r_e_f_i_x-_1 c               Capitalises the current character.
  1840.      ddddoooowwwwnnnnccccaaaasssseeee----cccchhhhaaaarrrr             _P_r_e_f_i_x-_1 l               Change the character under the cursor to lower case.
  1841.      ppppuuuusssshhhh----tttteeeexxxxtttt                 _P_r_e_f_i_x-_1 p               Pushes the region from the cursor to  the  mark  on  the
  1842.                                                         stack.
  1843.      sssseeeetttt----mmmmaaaarrrrkkkk                  _P_r_e_f_i_x-_1 space           Sets a mark.
  1844.      uuuuppppccccaaaasssseeee----cccchhhhaaaarrrr               _P_r_e_f_i_x-_1 u               Change the character under the cursor to upper case.
  1845.      yyyyaaaannnnkkkk----ppppoooopppp                  _P_r_e_f_i_x-_1 y               Immediately after a yyyyaaaannnnkkkk,  replaces  the  inserted  text
  1846.                                                         string with the next previous killed text string.
  1847.      eeeexxxxcccchhhhaaaannnnggggeeee----ppppooooiiiinnnntttt----aaaannnndddd----mmmmaaaarrrrkkkk   _P_r_e_f_i_x-_2 Ctrl-X          Interchanges the cursor and the mark.
  1848.      jjjjoooobbbbssss                      _P_r_e_f_i_x-_2 j               Print a list of the current jobs (OS/2 only).
  1849.      aaaauuuuttttoooo----iiiinnnnsssseeeerrrrtttt                                        Simply causes the character to appear as literal  input.
  1850.                                                         (Most ordinary characters are bound to this.)
  1851.      ddddeeeelllleeeetttteeee----cccchhhhaaaarrrr----ffffoooorrrrwwwwaaaarrrrdddd                                Deletes the character after the cursor.
  1852.  
  1853.  
  1854.  
  1855.  
  1856.  
  1857.      Page 29                                         (printed 6/30/94)
  1858.  
  1859.  
  1860.  
  1861.  
  1862.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  1863.  
  1864.  
  1865.  
  1866.      nnnnoooo----oooopppp                                              Does nothing.
  1867.      cccclllleeeeaaaarrrr----ssssccccrrrreeeeeeeennnn                                       Clear the screen and print the current line.
  1868.      rrrreeeesssseeeetttt                                              Reset input, clearing the current line and yank buffers.
  1869.                                                         Search the alias list for an alias named __L_e_t_t_e_r.  If an
  1870.                                                         alias  of this name is defined, its value is placed into
  1871.                                                         the input queue.
  1872.                                _P_r_e_f_i_x-_1 Ctrl-] LLLLeeeetttttttteeeerrrr   Search the alias list for an alias named __L_e_t_t_e_r.  If an
  1873.                                _P_r_e_f_i_x-_1 LLLLeeeetttttttteeeerrrr          alias  of this name is defined, its value is placed into
  1874.                                                         the input queue.  The LLLLeeeetttttttteeeerrrr parameter must not  specify
  1875.                                                         one of the escape functions.
  1876.  
  1877.  
  1878.         IIIInnnniiiittttiiiiaaaalllliiiissssaaaattttiiiioooonnnn FFFFiiiilllleeee
  1879.           When the shell is run in interactive mode, the Command  Line
  1880.           Editing  keys  and  other  user configuration parameters are
  1881.           read from the initialisation file _s_h._i_n_i.  This shell  looks
  1882.           for  this  file  in  the same directory as the sssshhhh executable
  1883.           which is running.  It does not  use  the  SSSSHHHHEEEELLLLLLLL  environment
  1884.           variable  or  search the directories in the PPPPAAAATTTTHHHH environment
  1885.           variable.  At present, there are two types of entry in  this
  1886.           file:  keyboard  configuration;  and  others.   The entry is
  1887.           contained in a single line and consists  of  a  keyword  (in
  1888.           upper  or lower case), white space, an equals symbols, white
  1889.           space and one or two numeric values (see _s_t_r_t_o_l(_3) for valid
  1890.           formats where _b_a_s_e parameter is zero), followed by an end of
  1891.           line character.
  1892.  
  1893.           For the keyboard entries, the numeric values give the MMMMSSSS----DDDDOOOOSSSS
  1894.           Function  8  (Console  Input without Echo) return values for
  1895.           that  entry.   Note  that  extended  codes  (function  keys)
  1896.           require  two calls to this function.  The first call returns
  1897.           zero and the second the extended code.  In the configuration
  1898.           file,  a  first  numeric  value of zero indicates a extended
  1899.           code and must be followed by a second value.  The shell also
  1900.           supports  the use of the AAAALLLLTTTT _k_e_y _i_n _c_o_m_b_i_n_a_t_i_o_n _w_i_t_h _a_n_o_t_h_e_r
  1901.           _k_e_y.  _I_n _t_h_i_s _c_a_s_e, _t_h_e  _f_i_r_s_t  _v_a_l_u_e  _c_o_n_t_a_i_n_s  0000xxxxffffffff,  that
  1902.           selects AAAALLLLTTTT key, and the second key contains the appropriate
  1903.           scan code for the key required.  The program sssshhhhoooowwwwkkkkeeeeyyyy can  be
  1904.           used to determine the scan codes required.
  1905.  
  1906.           A non-zero first numeric  value  must  not  be  followed  by
  1907.           anything else on the line.
  1908.  
  1909.           Other entries must only have  one  numeric  value.   A  zero
  1910.           value disables the function and a non-zero value enables the
  1911.           function.  At present, there are two other functions:
  1912.  
  1913.           BBBBeeeellllllll Enable/disable warning bells
  1914.  
  1915.           HHHHaaaallllffffHHHHeeeeiiiigggghhhhtttt
  1916.                Use full or halfheight block cursor to indicate  Insert
  1917.                mode
  1918.  
  1919.  
  1920.  
  1921.      Page 30                                         (printed 6/30/94)
  1922.  
  1923.  
  1924.  
  1925.  
  1926.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  1927.  
  1928.  
  1929.  
  1930.           IIIInnnnsssseeeerrrrttttMMMMooooddddeeee
  1931.                Set the default insert mode on or off
  1932.  
  1933.           IIIInnnnsssseeeerrrrttttCCCCuuuurrrrssssoooorrrr
  1934.                Enable/disable the insert mode cursor.
  1935.  
  1936.           RRRRoooooooottttDDDDrrrriiiivvvveeee
  1937.                Determines  the  root  drive   from   which   to   read
  1938.                /_e_t_c/_p_r_o_f_i_l_e.
  1939.  
  1940.           EEEEOOOOFFFFKKKKeeeeyyyy
  1941.                Determines the End-of-File key.
  1942.  
  1943.           Invalid lines or lines beginning with a #### are ignored.
  1944.  
  1945.           The following table gives the list  of  valid  keywords  and
  1946.           their default values:
  1947.  
  1948.           _________________________________________________________________________
  1949.            Keyword            First numeric   Second numeric   Actual Key
  1950.           _________________________________________________________________________
  1951.            KEYBOARD ENTRIES
  1952.            ScanBackward       0               0x49             PAGE UP
  1953.            ScanForeward       0               0x51             PAGE DOWN
  1954.            Previous           0               0x48             UP ARROW
  1955.            Next               0               0x50             DOWN ARROW
  1956.            Left               0               0x4b             LEFT ARROW
  1957.            Right              0               0x4d             RIGHT ARROW
  1958.            WordRight          0               0x74             Control RIGHT ARROW
  1959.            WordLeft           0               0x73             Control LEFT ARROW
  1960.            Start              0               0x47             HOME
  1961.            Clear              0               0x76             Control PAGE DOWN
  1962.            Flush              0               0x75             Control END
  1963.            End                0               0x4f             END
  1964.            Insert             0               0x52             INSERT
  1965.            DeleteRight        0               0x53             DELETE
  1966.            DeleteLeft         0x08                             BACKSPACE
  1967.            Complete           0               0x77             Control HOME
  1968.            Directory          0               0x0f             Shift TAB
  1969.            ClearScreen        0               0x84             Control PAGE UP
  1970.            Jobs               0               0x68             ALT F1
  1971.            Transpose          0x14                             Control T
  1972.            Quote              0x11                             Control Q
  1973.           _________________________________________________________________________
  1974.            OTHER FUNCTIONS
  1975.            Bell               0
  1976.            HalfHeight         0
  1977.            InsertMode         0
  1978.            InsertCursor       1
  1979.            RootDrive          3
  1980.            EOFKey             0x1a
  1981.           _________________________________________________________________________
  1982.  
  1983.  
  1984.  
  1985.      Page 31                                         (printed 6/30/94)
  1986.  
  1987.  
  1988.  
  1989.  
  1990.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  1991.  
  1992.  
  1993.  
  1994.  
  1995.  
  1996.         EEEExxxxeeeeccccuuuuttttiiiioooonnnn
  1997.           Each time a command is executed, the above substitutions are
  1998.           carried out.  If the command name matches one of the _S_p_e_c_i_a_l
  1999.           _C_o_m_m_a_n_d_s listed below, it is executed in the shell  process.
  2000.           If  the  command  name does not match a _S_p_e_c_i_a_l _C_o_m_m_a_n_d, but
  2001.           matches the name of a  defined  function,  the  function  is
  2002.           executed  in  the  shell process (note how this differs from
  2003.           the  execution  of  shell   procedures).    The   positional
  2004.           parameters  $$$$1111,  $$$$2222,  ....   are set to the arguments of the
  2005.           function.  If the command name  matches  neither  a  _S_p_e_c_i_a_l
  2006.           _C_o_m_m_a_n_d nor the name of a defined function, a new process is
  2007.           created and an attempt is made to execute  the  command  via
  2008.           _e_x_e_c(2).
  2009.  
  2010.           The shell parameter PPPPAAAATTTTHHHH defines the  search  path  for  the
  2011.           directory  containing  the  command.   Alternative directory
  2012.           names are separated by a semi-colon (;;;;).  The  default  path
  2013.           is  ....;;;;cccc::::////bbbbiiiinnnn;;;;cccc::::////uuuussssrrrr////bbbbiiiinnnn  (specifying  the current directory,
  2014.           cccc::::////bbbbiiiinnnn, and cccc::::////uuuussssrrrr////bbbbiiiinnnn,  in  that  order).   Note  that  the
  2015.           current  directory  is  specified by a null path name, which
  2016.           can appear immediately after the equal sign or  between  the
  2017.           semi-colon  delimiters  anywhere  else in the path list.  If
  2018.           the command name contains a //// or starts with xxxx:::: (where x  is
  2019.           a  drive  letter) the search path is not used; such commands
  2020.           will not be executed by the  restricted  shell.   Otherwise,
  2021.           each  directory  in  the  path is searched for an executable
  2022.           file.  Executable files are indicated  by  a  .exe  or  .com
  2023.           extension.   This extension is automatically supplied by the
  2024.           shell and not have to be entered by the user.
  2025.  
  2026.           If the file with a .com or .exe extension cannot be found in
  2027.           the  directory,  the file is opened and first 512 characters
  2028.           are read.  If there are no characters in the  block  with  a
  2029.           value  in  the  range  0  to  7, the file is assumed to be a
  2030.           script file containing shell commands.  Note that the  shell
  2031.           will  check  the  file and if that file does not exist or is
  2032.           not a script, it will try the file with an extension of  ....sssshhhh
  2033.           or  ....kkkksssshhhh.  If a ((((ggggiiiivvvveeeennnn bbbbyyyy tttthhhheeee eeeennnnvvvviiiirrrroooonnnnmmmmeeeennnntttt vvvvaaaarrrriiiiaaaabbbblllleeee SSSSHHHHEEEELLLLLLLL) is
  2034.           spawned to read it.
  2035.  
  2036.           If the script file starts with the a line  of  the  form  #!
  2037.           _i_n_t_e_r_p_r_e_t_e_r  [_a_r_g_u_m_e_n_t_s], the interpreter is invoked instead
  2038.           of the shell to process the script.  Optional arguments  can
  2039.           be  supplied  in the script file which are passed before the
  2040.           name of the script file.  Thus, if the file  _d_e_m_o  contained
  2041.           the following string as the first line
  2042.  
  2043.                #! perl -sP
  2044.  
  2045.           Entering _d_e_m_o _n_a_m_e would be equivalent to entering the  _p_e_r_l
  2046.           -_s_P  _n_a_m_e  at  the  command  prompt.   Note  that  no  other
  2047.  
  2048.  
  2049.      Page 32                                         (printed 6/30/94)
  2050.  
  2051.  
  2052.  
  2053.  
  2054.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  2055.  
  2056.  
  2057.  
  2058.           processing of the first line other that the  separation  (by
  2059.           white  space)  into  arguments  is  done.   Note that if the
  2060.           iiiinnnntttteeeerrrrpppprrrreeeetttteeeerrrr is either /_b_i_n/_s_h or /_b_i_n/_k_s_h, the value of  the
  2061.           SSSSHHHHEEEELLLLLLLL environment variable is used to execute the script.
  2062.  
  2063.           If none of the above conditions for a  executable  file  are
  2064.           detected  and  a  file  with  a .bat extension exists in the
  2065.           directory,  the  command  processor  given  by  the  CCCCOOOOMMMMSSSSPPPPEEEECCCC
  2066.           environment  variable  is spawned to process the file.  This
  2067.           is normally the standard MMMMSSSS----DDDDOOOOSSSS _c_o_m_m_a_n_d._c_o_m or OOOOSSSS////2222  _c_m_d._e_x_e
  2068.           processor.
  2069.  
  2070.           A parenthesised command is also executed in a sub-shell.
  2071.  
  2072.           Under MS-DOS or OS/2, the shell looks at  the  type  of  the
  2073.           program  which  is  about  to  be  executed.  If it is an MS
  2074.           Windows program,  the  shell  will  automatically  start  MS
  2075.           Windows,  unless  it  is  already running.  If MS Windows is
  2076.           already running, the shell will not start the program.
  2077.  
  2078.         CCCCoooommmmmmmmaaaannnndddd LLLLiiiinnnneeee BBBBuuuuiiiillllddddiiiinnnngggg
  2079.           The file pointed to by the EEEEXXXXTTTTEEEENNNNDDDDEEEEDDDD____LLLLIIIINNNNEEEE parameter  contains
  2080.           information  which  instructs the shell on how to create the
  2081.           command line for a particular program from  the  information
  2082.           entered  to  the shell.  If the program name is not found in
  2083.           this file, the standard MMMMSSSS----DDDDOOOOSSSS or OOOOSSSS////2222 mechanisms  are  used
  2084.           with no special processing.
  2085.  
  2086.           The file is scanned prior to the execution  of  an  external
  2087.           command.   An  entry  in  this file is contained in a single
  2088.           line and consists of a  program  name  (in  upper  or  lower
  2089.           case),  white  space,  an equals symbol, white space and the
  2090.           program  type  followed  by  up  to  four  optional  values,
  2091.           followed  by  an end of line character.  The vvvvaaaalllluuuueeee tells the
  2092.           shell how to build the command line and the optional  values
  2093.           provide additional information.  The valid pppprrrrooooggggrrrraaaammmm ttttyyyyppppeeeessss are
  2094.           (note that invalid entries cause a line to be ignored) given
  2095.           below.   These  pppprrrrooooggggrrrraaaammmm ttttyyyyppppeeeessss must appear as the first value
  2096.           following the _e_q_u_a_l_s.   Otherwise,  they  are  ignored.   An
  2097.           empty  pppprrrrooooggggrrrraaaammmm ttttyyyyppppeeeessss may be empty to only select one or more
  2098.           of the optional values.
  2099.  
  2100.           Under OOOOSSSS////2222, by default the shell generates the command  line
  2101.           using   the   format  specified  by  Eberhard  Mattes's  EMX
  2102.           interface.  This is makes no difference to programs which do
  2103.           not support the interface.
  2104.  
  2105.                uuuunnnniiiixxxx This program can process the  command  line  using
  2106.                     the  indirect  command  file  character @@@@.  When a
  2107.                     program, which can process this  format,  finds  a
  2108.                     command  line  parameter  starting with a @@@@ in the
  2109.                     command line, it treats the rest of the  parameter
  2110.  
  2111.  
  2112.  
  2113.      Page 33                                         (printed 6/30/94)
  2114.  
  2115.  
  2116.  
  2117.  
  2118.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  2119.  
  2120.  
  2121.  
  2122.                     as  a  file  and reads the command line parameters
  2123.                     from that file (one per  line,  the  end  of  line
  2124.                     characters  can be escaped by preceding with a \\\\).
  2125.                     Examples  of  this   functionality   include   the
  2126.                     Standard LLLLiiiinnnnkkkkeeeerrrr and LLLLiiiibbbbrrrraaaarrrriiiiaaaannnn.
  2127.  
  2128.                     The file name is set up in UUUUNNNNIIIIXXXX format (using //// as
  2129.                     the directory separators).
  2130.  
  2131.                     This functionality allows the user  to  get  round
  2132.                     the  127 byte command line length limit of MMMMSSSS----DDDDOOOOSSSS.
  2133.                     A sample version of the code to process wild cards
  2134.                     and  indirect  command  files is included with the
  2135.                     source of the shell in the file _s_t_d_a_r_g_v._c.
  2136.  
  2137.                ddddoooossss  This program can process the  command  line  using
  2138.                     the  indirect  command file character @@@@.  The file
  2139.                     name is set up in DOS  format  (using  \\\\s  as  the
  2140.                     directory separators).
  2141.  
  2142.                eeeennnnvvvviiiirrrroooonnnn
  2143.                     The command line is passed to the external program
  2144.                     in the environment variable specified by the first
  2145.                     optional value.  The optional second  value  which
  2146.                     is   numeric,   gives   the   parameter  separator
  2147.                     character to be  used  (see  _s_t_r_t_o_l(_3)  for  valid
  2148.                     formats  where  _b_a_s_e  parameter is zero).  If this
  2149.                     second value is  missing  or  evaluates  to  zero,
  2150.                     space is used.
  2151.  
  2152.           The following optional values described below  may  be  used
  2153.           after either uuuunnnniiiixxxx or ddddoooossss or by themselves:
  2154.  
  2155.                sssswwwwiiiittttcccchhhh
  2156.                     The  optional  value  sssswwwwiiiittttcccchhhh  causes  the  program
  2157.                     parameters  to  be  converted  from UUUUNNNNIIIIXXXX format to
  2158.                     MMMMSSSS----DDDDOOOOSSSS  format.   This   means   that   parameters
  2159.                     beginning with an ---- have it converted to a ////.  For
  2160.                     all other parameters,  ////s  are  converted  to  \\\\s.
  2161.                     This option is not applied to quoted parameters or
  2162.                     escaped characters.
  2163.  
  2164.                     This functionality allows ease of entry of  MMMMSSSS----DDDDOOOOSSSS
  2165.                     commands  which expect MMMMSSSS----DDDDOOOOSSSS directory separators
  2166.                     which the shell interprets as the escape character
  2167.                     (not that the underlying MMMMSSSS----DDDDOOOOSSSS really cares).
  2168.  
  2169.                eeeexxxxppppoooorrrrtttt
  2170.                     The  optional  value  eeeexxxxppppoooorrrrtttt  causes  the   marked
  2171.                     environment  variables  to  be converted from UUUUNNNNIIIIXXXX
  2172.                     format to MMMMSSSS----DDDDOOOOSSSS format.  This  is  equivalent  to
  2173.                     setting the -_M flag for this program only.
  2174.  
  2175.  
  2176.  
  2177.      Page 34                                         (printed 6/30/94)
  2178.  
  2179.  
  2180.  
  2181.  
  2182.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  2183.  
  2184.  
  2185.  
  2186.                nnnnooooeeeexxxxppppaaaannnndddd
  2187.                     The optional value  nnnnooooeeeexxxxppppaaaannnndddd  disables  file  name
  2188.                     generation  when  building  the command line (also
  2189.                     see sssseeeetttt command).
  2190.  
  2191.                nnnnoooosssswwwwaaaapppp
  2192.                     The optional value nnnnoooosssswwwwaaaapppp  disables  swapping  for
  2193.                     the  command.   This may speed up the execution of
  2194.                     small commands.
  2195.  
  2196.                nnnnooooqqqquuuuooootttteeee
  2197.                     The optional value nnnnooooqqqquuuuooootttteeee stops  the  shell  from
  2198.                     escaping  double quotes in the command line before
  2199.                     they are passed to  the  command.   Double  quotes
  2200.                     processed by some programs.
  2201.  
  2202.                iiiiggggnnnnoooorrrreeeettttyyyyppppeeee
  2203.                     The optional value  iiiiggggnnnnoooorrrreeeettttyyyyppppeeee  stops  the  MS-DOS
  2204.                     version  of  the  shell  deciding  not  to execute
  2205.                     _f_o_r_e_i_g_n (non MS-DOS) executables.  The headers  of
  2206.                     some  ._E_X_E  files record incorrectly the operating
  2207.                     system and type  of  program.   This  option  only
  2208.                     applies to the MS-DOS version of the shell.
  2209.  
  2210.                ppppiiiippppeeeettttttttyyyy
  2211.                     The optional value ppppiiiippppeeeettttttttyyyy causes the shell to set
  2212.                     up  the environment such that child shells created
  2213.                     by this program will treat Pipes  as  TTYs.   This
  2214.                     feature is mainly to support EMACS under OS/2, but
  2215.                     may prove useful to other programs in  a  somewhat
  2216.                     bizarre set of circumstances.  This feature is not
  2217.                     support under the MS-DOS version of the shell.
  2218.  
  2219.                qqqquuuuooootttteeeewwwwiiiilllldddd
  2220.                     The optional value qqqquuuuooootttteeeewwwwiiiilllldddd causes the  shell  to
  2221.                     quote  wild  cards  in  the  command  line  to the
  2222.                     program.  The default is not to quote wild cards.
  2223.  
  2224.         FFFFuuuunnnnccccttttiiiioooonnnnssss
  2225.           The ffffuuuunnnnccccttttiiiioooonnnn keyword,  described  in  the  CCCCoooommmmmmmmaaaannnnddddssss  section
  2226.           above,  is  used to define shell functions.  Shell functions
  2227.           are read in and stored internally.  Alias names are resolved
  2228.           when  the  function  is  read.   Functions are executed like
  2229.           commands with the arguments passed as positional parameters.
  2230.           (See EEEExxxxeeeeccccuuuuttttiiiioooonnnn above).
  2231.  
  2232.           Functions execute in the same  process  as  the  caller  and
  2233.           share  all  files  and  present  working  directory with the
  2234.           caller.  Traps caught by  the  caller  are  reset  to  their
  2235.           default  action  inside the function.  A trap condition that
  2236.           is not caught or ignored by the function causes the function
  2237.           to  terminate  and  the  condition  to  be  passed on to the
  2238.  
  2239.  
  2240.  
  2241.      Page 35                                         (printed 6/30/94)
  2242.  
  2243.  
  2244.  
  2245.  
  2246.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  2247.  
  2248.  
  2249.  
  2250.           caller.  A trap set on EXIT inside a  function  is  executed
  2251.           after the function completes.
  2252.  
  2253.           Ordinarily, variables are shared between the calling program
  2254.           and the function.  However, the ttttyyyyppppeeeesssseeeetttt special command used
  2255.           within  a  function  defines  local  variables  whose  scope
  2256.           includes the current function and all functions it calls.
  2257.  
  2258.           The special command rrrreeeettttuuuurrrrnnnn is used to return  from  function
  2259.           calls.   Errors  within  functions  return  control  to  the
  2260.           caller.
  2261.  
  2262.           Function identifiers can be listed with the ffffuuuunnnnccccttttiiiioooonnnn special
  2263.           command.   The  text  of  functions  will  also  be  listed.
  2264.           Function  can  be  undefined  with  the  uuuunnnnffffuuuunnnnccccttttiiiioooonnnn  special
  2265.           command.
  2266.  
  2267.           Ordinarily, functions are unset when the  shell  executes  a
  2268.           shell  script.   Functions  that  need  to be defined across
  2269.           separate invocations of the shell should be  placed  in  the
  2270.           EEEENNNNVVVV file.
  2271.  
  2272.           The shell has an  enhancement  that  allows  it  to  process
  2273.           scripts,  etc.  by  recognising  their  file  eeeexxxxtttteeeennnnssssiiiioooonnnn (the
  2274.           character string following the last period).  If  the  shell
  2275.           recognises  the eeeexxxxtttteeeennnnssssiiiioooonnnn, it will invoke the function named
  2276.           after the eeeexxxxtttteeeennnnssssiiiioooonnnn, if it exists (for example:  the command
  2277.           _d_e_m_o._c  will invoke the function ._c).  The variable PPPPAAAATTTTHHHHEEEEXXXXTTTTSSSS
  2278.           contains the list of valid extensions (and must include  the
  2279.           default  extensions (._e_x_e, ._c_o_m, ._b_a_t or ._c_m_d, ._s_h, ._k_s_h and
  2280.           _n_o _e_x_t_e_n_s_i_o_n).  NNNNooootttteeee that functions cannot  be  set  up  for
  2281.           ._e_x_e or ._c_o_m.
  2282.  
  2283.           The  order  in  which  the  extensions  appear  in  PPPPAAAATTTTHHHHEEEEXXXXTTTTSSSS
  2284.           determines  the  order  in which the shell will search for a
  2285.           file with the appropriate extension.  If the shell  finds  a
  2286.           file  with  a  matched  extension and a function exists, the
  2287.           function is  invoked  with  parameter  0  set  to  the  full
  2288.           pathname  of  the  file.   The rest of the parameters to the
  2289.           function are set up as  for  normal  functions.   Beware  of
  2290.           invoking recursive functions.
  2291.  
  2292.         JJJJoooobbbbssss
  2293.           Under OOOOSSSS////2222, an interactive shell associates a _j_o_b with  each
  2294.           pipeline.   It keeps a table of current jobs, printed by the
  2295.           jjjjoooobbbbssss command, and assigns them small integer numbers.   When
  2296.           a  job  is started asynchronously with &&&&, the shell prints a
  2297.           line that looks like:
  2298.  
  2299.                [1] 1234
  2300.  
  2301.           indicating job number 1 was started asynchronously  and  had
  2302.  
  2303.  
  2304.  
  2305.      Page 36                                         (printed 6/30/94)
  2306.  
  2307.  
  2308.  
  2309.  
  2310.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  2311.  
  2312.  
  2313.  
  2314.           one (top-level) process whose process ID was 1234.
  2315.  
  2316.           There are several ways to refer to jobs in the shell.  A job
  2317.           can  be  referred to by the process id of any process in the
  2318.           job or by one of the following:
  2319.  
  2320.                %_n_u_m_b_e_r
  2321.                     The job with the given number.
  2322.  
  2323.                %_s_t_r_i_n_g
  2324.                     Any job whose command line begins with string.
  2325.  
  2326.                %?_s_t_r_i_n_g
  2327.                     Any job whose command line contains string.
  2328.  
  2329.                %%   Current job.
  2330.  
  2331.                %+   Equivalent to %%.
  2332.  
  2333.                %-   Previous job.
  2334.  
  2335.           The shell learns when a process changes state.   It  informs
  2336.           the  user  when  a  job  terminates, but only just before it
  2337.           prints a prompt.
  2338.  
  2339.           If you try to leave the shell  while  jobs  are  running  or
  2340.           stopped, you are warned, _Y_o_u _h_a_v_e _r_u_n_n_i_n_g _j_o_b_s.  You may use
  2341.           the jjjjoooobbbbssss command to identify them.  If you  immediately  try
  2342.           to exit again, the shell will not warn you a second time.
  2343.  
  2344.         SSSSppppeeeecccciiiiaaaallll CCCCoooommmmmmmmaaaannnnddddssss
  2345.           Input/output redirection is permitted  for  these  commands.
  2346.           File descriptor 1 is the default output location.
  2347.  
  2348.           ::::    No effect; the command does nothing.  A zero exit  code
  2349.                is returned.
  2350.  
  2351.           _l_e_t_t_e_r::::
  2352.                Select the drive specified by _l_e_t_t_e_r.
  2353.  
  2354.           .... _f_i_l_e
  2355.                Read and execute commands from _f_i_l_e  and  return.   The
  2356.                search  path  specified  by  PPPPAAAATTTTHHHH  is  used to find the
  2357.                directory containing _f_i_l_e.
  2358.  
  2359.           aaaalllliiiiaaaassss [ ----tttt ] [ _n_a_m_e[=_v_a_l_u_e ] ... ]
  2360.                AAAAlllliiiiaaaassss with no arguments prints the list of  aliases  in
  2361.                the  form  _n_a_m_e=vvvvaaaalllluuuueeee  on standard output.  An alias is
  2362.                defined for each _n_a_m_e whose _v_a_l_u_e is given.  A trailing
  2363.                space  in  _v_a_l_u_e causes the next word to be checked for
  2364.                alias substitution.  The ----tttt flag is  used  to  set  and
  2365.                list  tracked aliases.  The _v_a_l_u_e of a tracked alias is
  2366.  
  2367.  
  2368.  
  2369.      Page 37                                         (printed 6/30/94)
  2370.  
  2371.  
  2372.  
  2373.  
  2374.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  2375.  
  2376.  
  2377.  
  2378.                the full pathname corresponding to the given name.  The
  2379.                _v_a_l_u_e becomes undefined when the _v_a_l_u_e of PATH is reset
  2380.                but the aliases remained tracked.  Without the ----tttt flag,
  2381.                for  each  _n_a_m_e in the argument list for which no _v_a_l_u_e
  2382.                is given, the _n_a_m_e and _v_a_l_u_e of the alias  is  printed.
  2383.                Alias  returns zero unless a _n_a_m_e is given for which no
  2384.                alias has been defined.
  2385.  
  2386.           bbbbiiiinnnndddd -m [ _s_t_r_i_n_g ] = [ _e_d_i_t_i_n_g-_c_o_m_m_a_n_d ]
  2387.                BBBBiiiinnnndddd with no arguments prints the  list  of  EMACS  key
  2388.                bindings  in  the  form  _n_a_m_e=vvvvaaaalllluuuueeee on standard output.
  2389.                The specified _e_d_i_t_i_n_g _c_o_m_m_a_n_d is  bound  to  the  given
  2390.                _s_t_r_i_n_g,  which  should  consist  of a control character
  2391.                (which may be written  using  ``caret  notation''  ^^^^_x),
  2392.                optionally   preceded   by   one   of  the  two  prefix
  2393.                characters.  Future input of the _s_t_r_i_n_g will cause  the
  2394.                _e_d_i_t_i_n_g  _c_o_m_m_a_n_d  to  be  immediately  invoked.   Three
  2395.                prefix characters (normal ESC and  ^X)  are  supported.
  2396.                If  the -_m flag is supplied, the specified input _s_t_r_i_n_g
  2397.                will afterwards be immediately replaced  by  the  given
  2398.                _e_d_i_t_i_n_g-_c_o_m_m_a_n_d   string,  which  may  contain  _e_d_i_t_i_n_g
  2399.                _c_o_m_m_a_n_d_s.
  2400.  
  2401.           bbbbrrrreeeeaaaakkkk [ _n ]
  2402.                Exit from the enclosing ffffoooorrrr or wwwwhhhhiiiilllleeee loop, if any.   If
  2403.                _n is specified, break _n levels.
  2404.  
  2405.           bbbbuuuuiiiillllttttiiiinnnn [ _a_r_g_s ... ]
  2406.                Force  the  selection  of  the  bbbbuuuuiiiillllttttiiiinnnn  version  of  a
  2407.                command.   The  builtin  shell  command selected by the
  2408.                first  _a_r_g_s  value  is  executed  with  the  parameters
  2409.                defined  by  the  remaining _a_r_g_ss.  If no arguments are
  2410.                given, a list of all _b_u_i_l_t_i_n commands is printed.
  2411.  
  2412.                If the first argument is  one  of  the  following,  the
  2413.                processing  of  the  builtin  command  in the following
  2414.                arguments are changed as indicated:
  2415.  
  2416.                ----aaaa   Set the following builtin commands to use  builtin
  2417.                     version  in preference to any function or external
  2418.                     versions.
  2419.  
  2420.                ----dddd   Set the following  builtin  commands  to  use  the
  2421.                     function  or external version in preference to the
  2422.                     builtin version.
  2423.  
  2424.                ----ssss   Display  the  current  status  of  the   following
  2425.                     builtin commands.
  2426.  
  2427.           ccccoooonnnnttttiiiinnnnuuuueeee [ _n ]
  2428.                Resume the next iteration of the enclosing ffffoooorrrr or wwwwhhhhiiiilllleeee
  2429.                loop.   If _n is specified, resume at the _n-th enclosing
  2430.  
  2431.  
  2432.  
  2433.      Page 38                                         (printed 6/30/94)
  2434.  
  2435.  
  2436.  
  2437.  
  2438.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  2439.  
  2440.  
  2441.  
  2442.                loop.
  2443.  
  2444.           ccccdddd [ ----LLLLPPPP ] [ _a_r_g ]
  2445.           ccccdddd _s_e_a_r_c_h _r_e_p_l_a_c_e
  2446.                This command can be in either of  two  forms.   In  the
  2447.                first  form  it  changes  the current directory to _a_r_g.
  2448.                The shell parameter HHHHOOOOMMMMEEEE is the default _a_r_g.  The shell
  2449.                parameter  CCCCDDDDPPPPAAAATTTTHHHH  defines  the  search  path  for  the
  2450.                directory containing _a_r_g.  Alternative directory  names
  2451.                are separated by a semi-colon (;;;;).  The default path is
  2452.                <<<<nnnnuuuullllllll>>>> (specifying the current directory).   Note  that
  2453.                the current directory is specified by a null path name,
  2454.                which can appear immediately after the  equal  sign  or
  2455.                between  the semi-colon delimiters anywhere else in the
  2456.                path list.  If _a_r_g begins with a //// or xxxx:::: (where x is  a
  2457.                drive letter), the search path is not used.  Otherwise,
  2458.                each directory in the path is searched for _a_r_g.  The _c_d
  2459.                command may not be executed by _r_s_h.
  2460.  
  2461.                The -_L option (default) preserves logical  naming  when
  2462.                treating  substituted  drives (see SSSSUUUUBBBBSSSSTTTT((((1111))))).  ccccdddd ----LLLL ........
  2463.                moves the current directory one path  component  closer
  2464.                to  the  root  directory.   The ----PPPP option preserves the
  2465.                physical path when treating substituted drives.  ccccdddd  ----PPPP
  2466.                ........   changes   the  working  directory  to  the  parent
  2467.                directory of the current directory.  These options  are
  2468.                only available under the MS-DOS 16 bit version.
  2469.  
  2470.                In the second form, ccccdddd substitutes the  string  _r_e_p_l_a_c_e
  2471.                for  the  string  _s_e_a_r_c_h in the current directory name,
  2472.                PPPPWWWWDDDD and tries to change to this new directory.
  2473.  
  2474.                Note that the name cccchhhhddddiiiirrrr is an builtin alternative name
  2475.                for  ccccdddd, allowing the user to set up aliases for ccccdddd and
  2476.                still   have   access   to   the    change    directory
  2477.                functionality.
  2478.  
  2479.           ddddeeeettttaaaacccchhhh _p_r_o_g_r_a_m [ _a_r_g_s ]
  2480.                This command  (which  is  only  available  under  OOOOSSSS////2222)
  2481.                starts and simultaneously detaches an OOOOSSSS////2222 _p_r_o_g_r_a_m from
  2482.                the shell.  Any _p_r_o_g_r_a_m that  is  started  with  ddddeeeettttaaaacccchhhh
  2483.                command  must  be able to process independently outside
  2484.                the control of the shell.  Builtin shell  commands  and
  2485.                functions cannot be detached.
  2486.  
  2487.           eeeecccchhhhoooo [ _a_r_g ... ]
  2488.                Echo arguments. EEEEcccchhhhoooo writes its arguments separated  by
  2489.                blanks  and  terminated  by  a new-line on the standard
  2490.                output.  It also understands C-like escape conventions;
  2491.                beware of conflicts with the shell's use of \\\\:
  2492.  
  2493.                \\\\bbbb   backspace
  2494.  
  2495.  
  2496.  
  2497.      Page 39                                         (printed 6/30/94)
  2498.  
  2499.  
  2500.  
  2501.  
  2502.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  2503.  
  2504.  
  2505.  
  2506.                \\\\cccc   print line without new-line
  2507.                \\\\ffff   form-feed
  2508.                \\\\nnnn   new-line
  2509.                \\\\rrrr   carriage return
  2510.                \\\\tttt   tab
  2511.                \\\\vvvv   vertical tab
  2512.                \\\\\\\\   backslash
  2513.                \\\\_n   the 8-bit character whose ASCII code is the 1-, 2-
  2514.                     or 3-digit octal number _n, which must start with a
  2515.                     zero.
  2516.  
  2517.                     _E_c_h_o  is  useful  for  producing  diagnostics   in
  2518.                     command  files  and  for sending known data into a
  2519.                     pipe.
  2520.  
  2521.           eeeevvvvaaaallll [ _a_r_g ... ]
  2522.                The arguments are read as input to the  shell  and  the
  2523.                resulting command(s) executed.
  2524.  
  2525.           eeeexxxxeeeecccc [ _a_r_g ... ]
  2526.                The command specified by the arguments is  executed  in
  2527.                place  of  this  shell  without creating a new process.
  2528.                Input/output arguments may  appear  and,  if  no  other
  2529.                arguments are given, cause the shell input/output to be
  2530.                modified.
  2531.  
  2532.           eeeexxxxiiiitttt [ _n ]
  2533.                Causes a shell to exit with the exit  status  specified
  2534.                by  _n.   If _n is omitted the exit status is that of the
  2535.                last command executed (an end-of-file will  also  cause
  2536.                the shell to exit.)
  2537.  
  2538.           eeeexxxxppppoooorrrrtttt [ _n_a_m_e[=_v_a_l_u_e] ... ]
  2539.                The given _n_a_m_es are marked for automatic export to  the
  2540.                _e_n_v_i_r_o_n_m_e_n_t  of  subsequently-executed commands.  If no
  2541.                arguments are given, a  list  of  all  names  that  are
  2542.                exported  in this shell is printed.  Function names may
  2543.                _n_o_t be exported.
  2544.  
  2545.           ffffaaaallllsssseeee
  2546.                No effect; the command does nothing.  A  non-zero  exit
  2547.                code is returned.
  2548.  
  2549.           ffffcccc [ ----eeee _E_d_i_t_o_r_N_a_m_e ] [ ----nnnnllllrrrr ] [ _F_i_r_s_t [ _L_a_s_t ] ]
  2550.           ffffcccc ----eeee ---- [ _O_l_d=_N_e_w ] [ _C_o_m_m_a_n_d ]
  2551.                In the first form, a range of commands  from  _F_i_r_s_t  to
  2552.                _L_a_s_t  is  selected from the last 100 commands that were
  2553.                typed at the terminal.  The _F_i_r_s_t and  _L_a_s_t  parameters
  2554.                can  be specified as a number or as a string.  A string
  2555.                locates the most recent command starting with the given
  2556.                string.   A negative number is used as an offset to the
  2557.                current command number.  If _L_a_s_t is not specified, then
  2558.  
  2559.  
  2560.  
  2561.      Page 40                                         (printed 6/30/94)
  2562.  
  2563.  
  2564.  
  2565.  
  2566.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  2567.  
  2568.  
  2569.  
  2570.                it  is  set  to  _F_i_r_s_t.  If _F_i_r_s_t is not specified, the
  2571.                default is the previous command for editing and -16 for
  2572.                listing.
  2573.  
  2574.                ----llll   Lists the commands to standard output.
  2575.  
  2576.                ----rrrr   Reverses the order of the commands in the list.
  2577.  
  2578.                ----nnnn   Suppresses command numbers when listing.
  2579.  
  2580.                If the ----llll flag is not  specified,  the  editor  program
  2581.                specified by _E_d_i_t_o_r_N_a_m_e is invoked on a file containing
  2582.                these  key-board  commands.   If  _E_d_i_t_o_r_N_a_m_e   is   not
  2583.                supplied,  then  the  value  of the FFFFCCCCEEEEDDDDIIIITTTT parameter is
  2584.                used as the editor.   When  editing  is  complete,  the
  2585.                edited command(s) is executed.
  2586.  
  2587.                In the second form, the specified  _c_o_m_m_a_n_d  is  carried
  2588.                out again after the _O_l_d=_N_e_w substitution is performed.
  2589.  
  2590.           ffffuuuunnnnccccttttiiiioooonnnnssss [ _n_a_m_e ... ]
  2591.                The functions  given  by  _n_a_m_es  are  printed.   If  no
  2592.                arguments are given, a all the functions are displayed.
  2593.  
  2594.           ggggeeeettttooooppppttttssss _o_p_t_s_t_r_i_n_g _n_a_m_e [ _a_r_g ... ]
  2595.                Checks _a_r_g for legal options.  If _a_r_g is  omitted,  the
  2596.                positional  parameters  are  used.   An option argument
  2597.                begins with a ++++ or a ----.  An option not beginning with ++++
  2598.                or  ----  or  the argument -------- ends the options.  _o_p_t_s_t_r_i_n_g
  2599.                contains the letters that  ggggeeeettttooooppppttttssss  recognises.   If  a
  2600.                letter  is  followed by a ::::, that option is expected to
  2601.                have an argument.  The options can  be  separated  from
  2602.                the argument by blanks.
  2603.  
  2604.                ggggeeeettttooooppppttttssss places the next option letter it  finds  inside
  2605.                variable  _n_a_m_e  eeeeaaaacccchhhh  ttttiiiimmmmeeee  iiiitttt  iiiissss  iiiinnnnvvvvooookkkkeeeedddd,,,,  wwwwiiiitttthhhh  aaaa ++++
  2606.                prepended when _a_r_g begins with a ++++.  The index  of  the
  2607.                next  arg is stored in OOOOPPPPTTTTIIIINNNNDDDD.  The option argument, if
  2608.                any, gets stored in OOOOPPPPTTTTAAAARRRRGGGG,
  2609.  
  2610.                A leading :::: in _o_p_t_s_t_r_i_n_g causes ggggeeeettttooooppppttttssss  to  store  the
  2611.                letter  of an invalid option in OOOOPPPPTTTTAAAARRRRGGGG, and to set _n_a_m_e
  2612.                to ???? for an unknown option and to  ::::  when  a  required
  2613.                option  is missing.  Otherwise, ggggeeeettttooooppppttttssss prints an error
  2614.                message.  The exit status is non-zero when there are no
  2615.                more options.
  2616.  
  2617.           hhhhiiiissssttttoooorrrryyyy [ ----ddddeeeeiiiillllssss ]
  2618.                The hhhhiiiissssttttoooorrrryyyy command, with no arguments, will print  all
  2619.                the  commands  that  are currently saved in the shell's
  2620.                history buffers.  As new  commands  are  executed,  and
  2621.                space  in  the  buffers  runs out, old commands will be
  2622.  
  2623.  
  2624.  
  2625.      Page 41                                         (printed 6/30/94)
  2626.  
  2627.  
  2628.  
  2629.  
  2630.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  2631.  
  2632.  
  2633.  
  2634.                deleted.  The hhhhiiiissssttttoooorrrryyyy commands prints  out  the  stored
  2635.                commands  with  sequence  numbers.   Negative  numbered
  2636.                commands, through command  number  zero,  are  commands
  2637.                that  were  retrieved  from  the  saved  history  file.
  2638.                Commands  starting  at  one  were  entered  during  the
  2639.                current  login  session.   If  a saved command contains
  2640.                embedded newlines, these will be  printed  out  as  the
  2641.                sequence  \\\\nnnn,  so  that  individual command stay on one
  2642.                line.
  2643.  
  2644.                The arguments  changes  the  way  the  shell  processes
  2645.                history information as follows:
  2646.  
  2647.                ----dddd   Disable the saving  of  commands  in  the  history
  2648.                     file.
  2649.  
  2650.                ----eeee   Enable the saving of commands in the history file.
  2651.  
  2652.                ----iiii   Initialise the history file.
  2653.  
  2654.                ----llll   Load the  history  from  the  file  given  by  the
  2655.                     HHHHIIIISSSSTTTTFFFFIIIILLLLEEEE environment variable.
  2656.  
  2657.                ----ssss   Save the history to the file given by the HHHHIIIISSSSTTTTFFFFIIIILLLLEEEE
  2658.                     environment variable.
  2659.  
  2660.           jjjjoooobbbbssss [ ----llllpppp | [ ----PPPP _j_o_b ] ]
  2661.                This command (which is only available under OOOOSSSS////2222) lists
  2662.                the  active jobs; or all active jobs if job is omitted.
  2663.                The ----llll options lists process id's in  addition  to  the
  2664.                normal  information.   The  ----pppp flag lists all the child
  2665.                processes  of  the  current  shell,  displaying   their
  2666.                process  ID  and  thread count.  The ----PPPP iiiidddd option lists
  2667.                all the child processes of  the  specified  process  or
  2668.                job.  See JJJJoooobbbbssss for a description of the format of job.
  2669.  
  2670.           kkkkiiiillllllll [ ----ssssiiiigggg ] [ _p_r_o_c_e_s_s | %%%%_j_o_b_i_d ] ...
  2671.                This command (which is only available under OOOOSSSS////2222) sends
  2672.                either  the  TTTTEEEERRRRMMMM  (terminate)  signal or the specified
  2673.                signal to the specified _p_r_o_c_e_s_s_e_s.  Signals  are  given
  2674.                by name, which are listed by ''''kkkkiiiillllllll ----llll''''.  If the _p_r_o_c_e_s_s
  2675.                number begins with a %%%%, the signal is sent to  the  job
  2676.                referenced.   See  JJJJoooobbbbssss for a description of the format
  2677.                of a _j_o_b.
  2678.  
  2679.           lllleeeetttt [ _a_r_g ... ]
  2680.                Each _a_r_g is an arithmetic expression to  be  evaluated.
  2681.                All calculations are done as long integers and no check
  2682.                for overflow is performed.  See  AAAArrrriiiitttthhhhmmmmeeeettttiiiicccc  EEEEvvvvaaaalllluuuuaaaattttiiiioooonnnn
  2683.                above for a description of arithmetic expressions..
  2684.  
  2685.                The  return  code  is  0  if  the  value  of  the  last
  2686.  
  2687.  
  2688.  
  2689.      Page 42                                         (printed 6/30/94)
  2690.  
  2691.  
  2692.  
  2693.  
  2694.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  2695.  
  2696.  
  2697.  
  2698.                expression is non-zero, and 1 otherwise.
  2699.  
  2700.           mmmmssssddddoooossss [ _n_a_m_e[=_v_a_l_u_e] ... ]
  2701.                The given _n_a_m_es are marked _m_s_d_o_s format and if  the  ----MMMM
  2702.                flag is set, the values of the these _n_a_m_es are exported
  2703.                to child  processes  with  any  slashes  in  the  value
  2704.                replaced  by  \\\\s.  If no arguments are given, a list of
  2705.                all _m_s_d_o_s names is printed.
  2706.  
  2707.           pppprrrriiiinnnntttt [ ----RRRRnnnnpppprrrrssss ] [ ----uuuu uuuunnnniiiitttt ] [ _a_r_g_s ... ]
  2708.                The shell output mechanism.  With no flags or with flag
  2709.                -  or  --  the  _a_r_g_s  are printed on standard output as
  2710.                described by the eeeecccchhhhoooo command.
  2711.  
  2712.                ----RRRR   Prints in  the  raw  mode,  in  which  the  escape
  2713.                     conventions  of the eeeecccchhhhoooo command are ignored.  The
  2714.                     -_R option prints all subsequent _a_r_g_s  and  options
  2715.                     other than -_n.
  2716.  
  2717.                ----nnnn   Prevents  a  new-line  from  being  added  to  the
  2718.                     output.
  2719.  
  2720.                ----pppp   ----pppp  flag  has  not  effect  and  is  defined   for
  2721.                     compatibility.
  2722.  
  2723.                ----rrrr   Prints in  the  raw  mode,  in  which  the  escape
  2724.                     conventions of the eeeecccchhhhoooo command are ignored.
  2725.  
  2726.                ----ssss   Writes the _a_r_g_s to the history file instead of  to
  2727.                     standard output.
  2728.  
  2729.                ----uuuu uuuunnnniiiitttt
  2730.                     Specifies a one digit file descriptor uuuunnnniiiitttt  number
  2731.                     on which the output is placed.  The default is 1.
  2732.  
  2733.           ppppwwwwdddd [ ----LLLLPPPP ] [ _d_r_i_v_e ... ]
  2734.                Print the  current  working  directory.   If  _d_r_i_v_e  is
  2735.                present,  the  current working directory on each of the
  2736.                drives is printed.  _d_r_i_v_e contains a  string  of  drive
  2737.                letters, no colons are required.
  2738.  
  2739.                The -_L option (default) preserves the  logical  meaning
  2740.                of  the current directory and -_P preserves the physical
  2741.                meaning  of  the  current  directory  if  it  is  on  a
  2742.                substituted  drive  (see ccccdddd and SSSSUUUUBBBBSSSSTTTT((((1111))))).  This option
  2743.                is only available under the MS-DOS 16bit version.
  2744.  
  2745.           rrrreeeeaaaadddd [ ----pppprrrrssss ] [ ----uuuu uuuunnnniiiitttt ] [ _n_a_m_e?_p_r_o_m_p_t ] [ _n_a_m_e ... ]
  2746.                The shell input mechanism.  One line  is  read  and  is
  2747.                broken  up  into  words  using the characters in IIIIFFFFSSSS as
  2748.                separators.  In raw mode, ----rrrr, a \\\\ at the end of a  line
  2749.                does  not signify line continuation.  The first word is
  2750.  
  2751.  
  2752.  
  2753.      Page 43                                         (printed 6/30/94)
  2754.  
  2755.  
  2756.  
  2757.  
  2758.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  2759.  
  2760.  
  2761.  
  2762.                assigned to the first _n_a_m_e,  the  second  word  to  the
  2763.                second  _n_a_m_e, etc., with leftover words assigned to the
  2764.                last _n_a_m_e.  If the ----ssss flag is present, the  input  will
  2765.                be saved as a command in the history file.  The ----pppp flag
  2766.                has not effect and is defined for  compatibility.   The
  2767.                flag  ----uuuu  can  be  used  to  specify  a  one digit file
  2768.                descriptor uuuunnnniiiitttt to read from.  The file descriptor  can
  2769.                be  opened  with the eeeexxxxeeeecccc special command.  The default
  2770.                value of uuuunnnniiiitttt is 0.  If _n_a_m_e is omitted then  RRRREEEEPPPPLLLLYYYY  is
  2771.                used  as  the  default  name.   If  the  first argument
  2772.                contains a ????, the remainder of this word is used  as  a
  2773.                prompt  when  the  shell  is interactive.  If the given
  2774.                file descriptor is open for writing and is  a  terminal
  2775.                device   then  the  prompt  is  placed  on  this  unit.
  2776.                Otherwise the prompt is issued on  file  descriptor  2.
  2777.                The   return   code  is  0  unless  an  end-of-file  is
  2778.                encountered.
  2779.  
  2780.           rrrreeeeaaaaddddoooonnnnllllyyyy [ _n_a_m_e[=_v_a_l_u_e] ... ]
  2781.                The given _n_a_m_es are marked _r_e_a_d_o_n_l_y and the  values  of
  2782.                the  these  _n_a_m_es  may  not  be  changed  by subsequent
  2783.                assignment.  If no arguments are given, a list  of  all
  2784.                _r_e_a_d_o_n_l_y names is printed.
  2785.  
  2786.           rrrreeeettttuuuurrrrnnnn [ _n ]
  2787.                Causes  a  function  to  exit  with  the  return  value
  2788.                specified  by _n.  If _n is omitted, the return status is
  2789.                that of the last command executed.
  2790.  
  2791.           sssseeeetttt [ [----||||++++]aaaaeeeeffffkkkkmmmmnnnnttttuuuuvvvvxxxx ] [ ----oooo ooooppppttttiiiioooonnnn ] [ _a_r_g ... ]
  2792.  
  2793.                ----aaaa   Mark variables which are modified or  created  for
  2794.                     export.
  2795.  
  2796.                ----eeee   Exit immediately if a command exits  with  a  non-
  2797.                     zero exit status.
  2798.  
  2799.                ----ffff   Disable file name generation
  2800.  
  2801.                ----hhhh   Each command becomes a tracked  alias  when  first
  2802.                     encountered.
  2803.  
  2804.                ----kkkk   All  keyword   arguments   are   placed   in   the
  2805.                     environment  for  a  command,  not just those that
  2806.                     precede the command name.
  2807.  
  2808.                ----mmmm   Background jobs will run  in  a  separate  process
  2809.                     group  and a line will print upon completion.  The
  2810.                     exit status of background jobs is  reported  in  a
  2811.                     completion  message.  This  only  applies to OOOOSSSS////2222.
  2812.                     The programs are detached from the current process
  2813.                     group.
  2814.  
  2815.  
  2816.  
  2817.      Page 44                                         (printed 6/30/94)
  2818.  
  2819.  
  2820.  
  2821.  
  2822.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  2823.  
  2824.  
  2825.  
  2826.                ----nnnn   Read commands but do not execute them.
  2827.  
  2828.                ----oooo ooooppppttttiiiioooonnnn
  2829.                     The argument that follows this option can  be  one
  2830.                     of the following option names:
  2831.  
  2832.                     aaaalllllllleeeexxxxppppoooorrrrtttt
  2833.                          Same as ----aaaa....
  2834.  
  2835.                     bbbbeeeellllllll Enable alarm bell on errors
  2836.  
  2837.                     bbbbrrrreeeeaaaakkkk
  2838.                          Enable  the  extended  SIGINT  checking  (see
  2839.                          BBBBRRRREEEEAAAAKKKK  [ OOOONNNN |||| OOOOFFFFFFFF ] under _C_O_M_M_A_N_D._C_O_M).  This
  2840.                          option is only available under MMMMSSSS----DDDDOOOOSSSS.
  2841.  
  2842.                     eeeemmmmaaaaccccssss
  2843.                          Select emacs-like command line editing mode.
  2844.  
  2845.                     eeeerrrrrrrreeeexxxxiiiitttt
  2846.                          Same as ----eeee....
  2847.  
  2848.                     ggggmmmmaaaaccccssss
  2849.                          Select gmacs-like command line editing mode.
  2850.  
  2851.                     hhhhaaaallllffffhhhheeeeiiiigggghhhhtttt
  2852.                          Set cursor to halfheight when in insert mode.
  2853.                          If off, a full height cursor is used.
  2854.  
  2855.                     iiiiggggnnnnoooorrrreeeeccccaaaasssseeee
  2856.                          Under OOOOSSSS////2222, on non-FAT  (ie  case  retentive)
  2857.                          file systems, the shell will match file names
  2858.                          ignoring case.   Normally,  the  matches  are
  2859.                          case sensitive even though the file system is
  2860.                          only case retentive.
  2861.  
  2862.                     iiiiggggnnnnoooorrrreeeeeeeeooooffff
  2863.                          The shell will not exit on end-of-file.   The
  2864.                          command exit must be used.
  2865.  
  2866.                     iiiinnnnsssseeeerrrrttttmmmmooooddddeeee
  2867.                          Set the default edit mode  to  insert  rather
  2868.                          than overwrite.
  2869.  
  2870.                     kkkkeeeeyyyywwwwoooorrrrdddd
  2871.                          Same as ----kkkk....
  2872.  
  2873.                     mmmmaaaarrrrkkkkddddiiiirrrrssss
  2874.                          Appends a / (slash) to  all  directory  names
  2875.                          that  are a result of file name substitution.
  2876.                          mmmmssssddddoooossss Same as ----MMMM....
  2877.  
  2878.  
  2879.  
  2880.  
  2881.      Page 45                                         (printed 6/30/94)
  2882.  
  2883.  
  2884.  
  2885.  
  2886.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  2887.  
  2888.  
  2889.  
  2890.                     nnnnoooocccclllloooobbbbbbbbeeeerrrr
  2891.                          Prevents  redirection   >>>>   from   truncating
  2892.                          existing  files.   A vertical bar must follow
  2893.                          the redirection symbol  ((((>>>>||||))))  to  truncate  a
  2894.                          file when this option is turned on.
  2895.  
  2896.                     nnnnooooeeeexxxxeeeecccc
  2897.                          Same as ----nnnn....
  2898.  
  2899.                     nnnnoooogggglllloooobbbb
  2900.                          Same as ----ffff....
  2901.  
  2902.                     nnnnoooouuuunnnnsssseeeetttt
  2903.                          Same as ----uuuu....
  2904.  
  2905.                     oooossss2222  Tells the shell that the underlying operating
  2906.                          system is OS/2.
  2907.  
  2908.                     pppprrrriiiivvvviiiilllleeeeggggeeeedddd
  2909.                          Same as ----pppp....
  2910.  
  2911.                     rrrreeeeaaaallllppppiiiippppeeeessss
  2912.                          Under OOOOSSSS////2222, the shell will use OOOOSSSS////2222 pipes and
  2913.                          not temporary files to handle pipelines.  See
  2914.                          LLLLIIIIMMMMIIIITTTTAAAATTTTIIIIOOOONNNNSSSS.
  2915.  
  2916.                     ttttrrrraaaacccckkkkaaaallllllll
  2917.                          Same as ----hhhh....
  2918.  
  2919.                     vvvveeeerrrrbbbboooosssseeee
  2920.                          Same as ----vvvv....
  2921.  
  2922.                     vvvveeeerrrriiiiffffyyyy
  2923.                          Same as ----VVVV....
  2924.  
  2925.                     vvvviiii   Select vi-like command line editing mode.
  2926.  
  2927.                     wwwwiiiinnnnnnnntttt
  2928.                          Tells the shell that the underlying operating
  2929.                          system is MS Windows NT.
  2930.  
  2931.                     xxxxttttrrrraaaacccceeee
  2932.                          Same as ----xxxx....
  2933.  
  2934.                ----pppp   Not supported.
  2935.  
  2936.                ----tttt   Exit after reading and executing one command.
  2937.  
  2938.                ----uuuu   Treat   unset   variables   as   an   error   when
  2939.                     substituting.
  2940.  
  2941.                ----vvvv   Print shell input lines as they are read.
  2942.  
  2943.  
  2944.  
  2945.      Page 46                                         (printed 6/30/94)
  2946.  
  2947.  
  2948.  
  2949.  
  2950.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  2951.  
  2952.  
  2953.  
  2954.                ----wwww   Disable shell warning messages.
  2955.  
  2956.                ----xxxx   Print commands and their  arguments  as  they  are
  2957.                     executed.
  2958.  
  2959.                ----MMMM   For those variables marked as mmmmssssddddoooossss variables, the
  2960.                     values  are  exported  to child processes with the
  2961.                     slashes replaced by \\\\s.  Most MMMMSSSS----DDDDOOOOSSSS utilities  do
  2962.                     not care if a file name contains a slash or \\\\ as a
  2963.                     directory  separator.   However,  some  like   the
  2964.                     _l_i_n_k_e_r   require  \\\\s  in  the  value  of  the  LLLLIIIIBBBB
  2965.                     variable.
  2966.  
  2967.                ----VVVV   Enable the File write verification option  in  the
  2968.                     operation  system  (see  VVVVEEEERRRRIIIIFFFFYYYY [ OOOONNNN |||| OOOOFFFFFFFF ] under
  2969.                     _C_O_M_M_A_N_D._C_O_M or _C_M_D._E_X_E).
  2970.  
  2971.                --------   Do not change any of the flags; useful in  setting
  2972.                     $$$$1111 to ----.
  2973.  
  2974.                     Using ++++ rather than ---- causes  these  flags  to  be
  2975.                     turned  off.   These  flags  can also be used upon
  2976.                     invocation of the shell.  The current set of flags
  2977.                     may  be  found in $$$$----.  The remaining arguments are
  2978.                     positional parameters and are assigned, in  order,
  2979.                     to  $$$$1111,  $$$$2222,  ....   If no arguments are given the
  2980.                     values of all names are printed.
  2981.  
  2982.           sssshhhhiiiifffftttt [ _n ]
  2983.                The positional parameters from $$$$nnnn++++1111 ...  are renamed $$$$1111
  2984.                ....  If _n is not given, it is assumed to be 1.
  2985.  
  2986.      _s_t_r_i_n_g ] [ ----XXXX _d_i_r_e_c_t_o_r_y ] [ _a_r_g_s.. ]
  2987.           ssssttttaaaarrrrtttt [ ----ddddffffWWWWPPPPFFFFiiiibbbbCCCCIIIISSSSxxxxhhhhHHHH ] [ ----cccc [ vilsna ]]  [  ----
  2988.                tttt  _t_i_t_l_e  ]  [  ----eeee
  2989.      _t_i_t_l_e ] [ ----eeee _s_t_r_i_n_g ]
  2990.           ssssttttaaaarrrrtttt ----OOOO [ dos | pm ] [ ----hhhhHHHHffffWWWWPPPPFFFFxxxxiiiibbbbIIIIDDDD ] [ ----
  2991.                cccc  [  _v_i_l_s_n_a  ]]  [  ----tttt
  2992.           ssssttttaaaarrrrtttt ----AAAA _s_e_s_s_i_o_n_I_d
  2993.                This command (which is only available under  OOOOSSSS////2222)  has
  2994.                three  forms.  The first form starts an OOOOSSSS////2222 (or MMMMSSSS----DDDDOOOOSSSS
  2995.                under OOOOSSSS////2222 2.x)  _p_r_o_g_r_a_m  in  a  new  session.   If  no
  2996.                _p_r_o_g_r_a_m and _a_r_g_u_m_e_n_t_s parameters are entered, the shell
  2997.                is started unless the -C option has been used to select
  2998.                the     OOOOSSSS////2222     command     processor.     Also    see
  2999.                DDDDoooossssSSSSttttaaaarrrrttttSSSSeeeessssssssiiiioooonnnn((((2222)))).
  3000.  
  3001.                The second form allows you to display and/or modify the
  3002.                default  parameters used to DDDDoooossssSSSSttttaaaarrrrttttSSSSeeeessssssssiiiioooonnnn((((2222)))) when the
  3003.                shell automatically starts a new session (ie  when  you
  3004.                attempt  to  run  an  OOOOSSSS////2222  PPPPMMMM  or  MMMMSSSS----DDDDOOOOSSSS program).  A
  3005.                different set of parameters are used depending  on  the
  3006.  
  3007.  
  3008.  
  3009.      Page 47                                         (printed 6/30/94)
  3010.  
  3011.  
  3012.  
  3013.  
  3014.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  3015.  
  3016.  
  3017.  
  3018.                program  type and you can modify either the OOOOSSSS////2222 PPPPMMMM via
  3019.                ----OOOO ppppmmmm, or MMMMSSSS----DDDDOOOOSSSS via ----OOOO ddddoooossss parameters.   To  use  this
  3020.                form,  the  ----OOOO  switch  mmmmuuuusssstttt be the first option on the
  3021.                command line.
  3022.  
  3023.                The  third  form  allows  you  to  select  the  session
  3024.                _s_e_s_s_i_o_n_I_D.
  3025.  
  3026.                The arguments changes the  way  the  shell  starts  the
  3027.                session as follows:
  3028.                ----dddd   Normally, command  are  started  by  invoking  the
  3029.                     shell in the new session.  This option invokes the
  3030.                     command directly.
  3031.                ----SSSS   Invoke the shell to started the command in the new
  3032.                     session.
  3033.                ----ffff   The program becomes  the  foreground  session.  If
  3034.                     this  parameter  is  not  specified,  the  program
  3035.                     becomes a background session.
  3036.                ----bbbb   The program becomes the background session.
  3037.                ----iiii   The  new  session  will   inherit   the   original
  3038.                     environment  of  the  shell instead of the current
  3039.                     environment.
  3040.                ----IIII   The new session will independent  of  the  current
  3041.                     process.  Normally, the session is a child session
  3042.                     of the current process.  Independent sessions  are
  3043.                     not   terminated   when   the   shell  terminates.
  3044.                     Starting  a  child  session  prevents  any   child
  3045.                     session   or   process   from  also  starting  new
  3046.                     sessions.
  3047.                ----xxxx   The new  session  will  a  child  session  of  the
  3048.                     current process.
  3049.                ----tttt ttttiiiittttlllleeee
  3050.                     Sets the _t_i_t_l_e of the new session.
  3051.                ----FFFF   This application is a full-screen application that
  3052.                     must  run  in  a  separate  session independent of
  3053.                     Presentation Manager.
  3054.                ----WWWW   This is an OOOOSSSS////2222 application  that  runs  within  a
  3055.                     Presentation Manager window.
  3056.                ----PPPP   This application  is  started  as  a  Presentation
  3057.                     Manager application.
  3058.                ----CCCC   Use the OOOOSSSS////2222  command  processor  instead  of  the
  3059.                     shell.
  3060.                ----eeee ssssttttrrrriiiinnnngggg
  3061.                     This option can be  used  multiple  times  on  the
  3062.                     command  line  and  allows  the user to explicitly
  3063.                     specify the environment to be passed  to  the  new
  3064.                     process.   When  this  option  is used, only those
  3065.                     environment variables set up by the ----eeee options are
  3066.                     set  in  the  new session's environment.  Only one
  3067.                     environment  variable  can  be  assigned  per   ----eeee
  3068.                     switch.   The  ssssttttrrrriiiinnnnggggs are in standard environment
  3069.                     format (_n_a_m_e=_v_a_l_u_e).  This may of  particular  use
  3070.  
  3071.  
  3072.  
  3073.      Page 48                                         (printed 6/30/94)
  3074.  
  3075.  
  3076.  
  3077.  
  3078.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  3079.  
  3080.  
  3081.  
  3082.                     under OOOOSSSS////2222 2.x when starting MMMMSSSS----DDDDOOOOSSSS programs.
  3083.                ----cccc [ _v_i_l_s_n_a ]
  3084.                     This option allows the user to configure the  size
  3085.                     of  the  window  created  for the new session: _v -
  3086.                     visible;  _i  -  invisible;  _l  -  maximise;  _s   -
  3087.                     minimise;  _n  -  no  autoclose;  or _a - autoclose.
  3088.                     Multiple selections can be  made  on  one  option.
  3089.                     Any  selection  removes any inappropriate previous
  3090.                     selections  (ie.  _m_a_x_i_m_i_s_e  removes  any  previous
  3091.                     selected  _m_i_n_i_m_i_s_e).   Multiple ----cccc options are not
  3092.                     cumulative and only take the  values  selected  by
  3093.                     the   last  ----cccc  option.   The  default  is  window
  3094.                     configuration is _n_o _a_u_t_o_c_l_o_s_e.
  3095.                ----AAAA sssseeeessssssssiiiioooonnnnIIIIdddd
  3096.                     This option cannot be used with any  other  option
  3097.                     and  allows the user to switch to another session,
  3098.                     given by _s_e_s_s_i_o_n_I_D, which must be a child  session
  3099.                     of the current session.
  3100.                ----XXXX _d_i_r_e_c_t_o_r_y
  3101.                     This option allows the user to select the  startup
  3102.                     _d_i_r_e_c_t_o_r_y  if  the  command is to started in a new
  3103.                     session via the shell.
  3104.                ----hhhh   The  new  session   will   inherit   the   current
  3105.                     environment    of    the   shell   process   (file
  3106.                     descriptors, directory, etc).
  3107.                ----HHHH   The new session will inherit the  current  session
  3108.                     had when it started.
  3109.                ----DDDD   Display the start up parameters for PPPPMMMM  or  MMMMSSSS----DDDDOOOOSSSS
  3110.                     sessions.
  3111.                ----OOOO [ dos | pm ]
  3112.                     Select  the  session  parameters  to  display   or
  3113.                     modify.
  3114.                ----DDDD   Display the start up parameters for PPPPMMMM  or  MMMMSSSS----DDDDOOOOSSSS
  3115.                     sessions.
  3116.           sssswwwwaaaapppp [ _o_p_t_i_o_n_s ]
  3117.                This command (which is only  available  on  the  16-bit
  3118.                MS-DOS  version)  defines  how  the  shell  will handle
  3119.                swapping  itself  to  reduce  its  memory  requirements
  3120.                whilst other programs execute.  The options are
  3121.                ooooffffffff  Disable swapping.  The  shell  remains  in  memory
  3122.                     whilst  the  child  is  running  and  reduces  the
  3123.                     available memory by about 200K (depending  on  the
  3124.                     size of the environment and history).
  3125.                oooonnnn   Enable all devices.  The shell will  swap  out  to
  3126.                     either  expanded  or  extended  memory or to disk,
  3127.                     execute the command and then swap back in.  Whilst
  3128.                     swapped, the shell reduces the available memory by
  3129.                     about 3K.
  3130.                eeeexxxxppppaaaannnndddd
  3131.                     Enable  swapping  to  Expanded  Memory.   The  EMS
  3132.                     driver must exist on your system for this to work.
  3133.                eeeexxxxtttteeeennnndddd [ _s_t_a_r_t _a_d_d_r_e_s_s ]
  3134.  
  3135.  
  3136.  
  3137.      Page 49                                         (printed 6/30/94)
  3138.  
  3139.  
  3140.  
  3141.  
  3142.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  3143.  
  3144.  
  3145.  
  3146.                     Enable swapping to Extended Memory.  If  you  have
  3147.                     an  XMS  driver on your system, the shell will use
  3148.                     the XMS driver.  Otherwise, the BIOS Interrupt  15
  3149.                     interface  is  used.   The  optional start address
  3150.                     defines the based address in the  Extended  Memory
  3151.                     at which point the shell writes its swap area when
  3152.                     the BIOS interface is used.  The default  location
  3153.                     is _0_x_1_0_0_0_0_0.
  3154.                ddddiiiisssskkkk Enable swapping to  disk.   The  shell  creates  a
  3155.                     temporary   file  and  saves  itself  in  it.   On
  3156.                     completion, the file  is  deleted.   This  is  the
  3157.                     slowest method of swapping.
  3158.  
  3159.                     With no options, the current swapping options  are
  3160.                     displayed.
  3161.           tttteeeesssstttt _e_x_p_r
  3162.           [[[[ _e_x_p_r ]]]]
  3163.                Evaluate conditional expressions.  TTTTeeeesssstttt  evaluates  the
  3164.                expression  _e_x_p_r  and,  if its value is true, returns a
  3165.                zero (true) exit status; otherwise, a non-zero  (false)
  3166.                exit  status  is returned; tttteeeesssstttt also returns a non-zero
  3167.                exit status if there are no arguments.  The  primitives
  3168.                are  the  same  as  for  the  [[[[[[[[ _e_x_p_r_e_s_s_i_o_n ]]]]]]]] command,
  3169.                except that -_a and -_o are not primitives, but are  used
  3170.                to  combine operators (see tttteeeesssstttt ((((1111))))).  -_a is the binary
  3171.                aaaannnndddd operator and -_o is the binary oooorrrr operator.
  3172.  
  3173.                Notice that all the operators and  flags  are  separate
  3174.                arguments  to  tttteeeesssstttt.   Notice also that parentheses are
  3175.                meaningful  to  the  shell  and,  therefore,  must   be
  3176.                escaped.
  3177.  
  3178.           ttttrrrraaaapppp [ -_l ] _a_r_g ] [ _S_i_g_n_a_l_N_u_m_b_e_r ] ...
  3179.                The command _a_r_g is to be read  and  executed  when  the
  3180.                shell  receives signal(s) _S_i_g_n_a_l_N_u_m_b_e_r.  (Note that _a_r_g
  3181.                is scanned once when the trap is set and once when  the
  3182.                trap is taken.)  Trap commands are executed in order of
  3183.                signal number.  Any attempt to set a trap on  a  signal
  3184.                that  was  ignored  on  entry  to  the current shell is
  3185.                ineffective.
  3186.  
  3187.                If _a_r_g is absent all trap(s) _S_i_g_n_a_l_N_u_m_b_e_r are reset  to
  3188.                their  original values.  If _a_r_g is the null string this
  3189.                signal is ignored by the shell and by the  commands  it
  3190.                invokes.
  3191.  
  3192.                A potential point of  confusion  is  that  UUUUNNNNIIIIXXXX  signal
  3193.                numbers  are  different  from  MMMMSSSS----DDDDOOOOSSSS  and  OOOOSSSS////2222 signal
  3194.                numbers.  MMMMSSSS----DDDDOOOOSSSS  and  OOOOSSSS////2222  signal  numbers  sometimes
  3195.                appear to differ between compilers.  If a numeric value
  3196.                is used, it is assumed to be a UUUUNNNNIIIIXXXX signal  number  and
  3197.                this  is  mapped  to the appropriate MMMMSSSS----DDDDOOOOSSSS/OOOOSSSS////2222 signal
  3198.  
  3199.  
  3200.  
  3201.      Page 50                                         (printed 6/30/94)
  3202.  
  3203.  
  3204.  
  3205.  
  3206.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  3207.  
  3208.  
  3209.  
  3210.                number.  If there is no mapping, a warning  message  is
  3211.                displayed.   If  the signal number is a signal name, it
  3212.                is translated into the appropriate  MMMMSSSS----DDDDOOOOSSSS/OOOOSSSS////2222  signal
  3213.                number.   The  list  of valid signal names is displayed
  3214.                using the -_l flag.
  3215.  
  3216.                If _S_i_g_n_a_l_N_u_m_b_e_r is DDDDEEEEBBBBUUUUGGGG  then  _a_r_g  will  be  executed
  3217.                after  each  command.  If _S_i_g_n_a_l_N_u_m_b_e_r is EEEERRRRRRRR, _a_r_g will
  3218.                be executed whenever a  command  has  a  non-zero  exit
  3219.                code.
  3220.  
  3221.                If _S_i_g_n_a_l_N_u_m_b_e_r is 0 or EEEEXXXXIIIITTTT and the trap statement  is
  3222.                executed inside the body of a function, the command _a_r_g
  3223.                is  executed  after   the   function   completes.    If
  3224.                _S_i_g_n_a_l_N_u_m_b_e_r  is  0  or EEEEXXXXIIIITTTT for a trap set outside any
  3225.                function, the command _a_r_g is executed on exit from  the
  3226.                shell.
  3227.  
  3228.                The ttttrrrraaaapppp command with no arguments  prints  a  list  of
  3229.                commands associated with each signal number.
  3230.  
  3231.           ttttrrrruuuueeee No effect; the command does nothing.  A zero exit  code
  3232.                is returned.
  3233.  
  3234.           ttttyyyyppppeeeesssseeeetttt [ ----HHHHLLLLRRRRZZZZffffiiiillllpppprrrrttttuuuuxxxx[nnnn] [ nnnnaaaammmmeeee[ ====vvvvaaaalllluuuueeee ] ] ... ]
  3235.                When invoked inside a function, a new instance  of  the
  3236.                parameter  name  is  created.   The parameter value and
  3237.                type are restored when  the  function  completes.   The
  3238.                following list of attributes may be specified:
  3239.  
  3240.                ----HHHH   This flag provides UUUUNNNNIIIIXXXX to host-name file  mapping
  3241.                     on non-UUUUNNNNIIIIXXXX machines (see mmmmssssddddoooossss command).
  3242.  
  3243.                ----LLLL   Left justify and remove leading blanks from value.
  3244.                     If  nnnn  is  non-zero  it  defines  the width of the
  3245.                     field, otherwise it is determined by the width  of
  3246.                     the value of first assignment.  When the parameter
  3247.                     is assigned to, it is filled  on  the  right  with
  3248.                     blanks or truncated, if necessary, to fit into the
  3249.                     field.  Leading zeros are removed if the  ----ZZZZ  flag
  3250.                     is also set.  The ----RRRR flag is turned off.
  3251.  
  3252.                ----RRRR   Right justify and fill with leading blanks.  If  nnnn
  3253.                     is  non-zero,  it  defines the width of the field,
  3254.                     otherwise it is determined by  the  width  of  the
  3255.                     value  of  first  assignment.   The  field is left
  3256.                     filled with blanks or truncated from  the  end  if
  3257.                     the  parameter  is  reassigned.   The  ----LLLL  flag is
  3258.                     turned off.
  3259.  
  3260.                ----ZZZZ   Right justify and fill with leading zeros  if  the
  3261.                     first  non-blank  character  is a digit and the ----LLLL
  3262.  
  3263.  
  3264.  
  3265.      Page 51                                         (printed 6/30/94)
  3266.  
  3267.  
  3268.  
  3269.  
  3270.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  3271.  
  3272.  
  3273.  
  3274.                     flag has not been  set.   If  nnnn  is  non-zero,  it
  3275.                     defines  the  width  of the field, otherwise it is
  3276.                     determined by the width  of  the  value  of  first
  3277.                     assignment.
  3278.  
  3279.                ----ffff   The names refer  to  function  names  rather  than
  3280.                     parameter  names.   No assignments can be made and
  3281.                     the only other valid flags are ----tttt, which turns  on
  3282.                     execution  tracing  for  this  function and ----xxxx, to
  3283.                     allow the function  to  remain  in  effect  across
  3284.                     shell  procedures  executed  in  the  same process
  3285.                     environment.
  3286.  
  3287.                ----iiii   Parameter is an integer.   This  makes  arithmetic
  3288.                     faster.   If  nnnn  is non-zero it defines the output
  3289.                     arithmetic base, otherwise  the  first  assignment
  3290.                     determines the output base.
  3291.  
  3292.                ----llll   All upper-case characters converted to lower-case.
  3293.                     The upper-case flag, ----uuuu is turned off.
  3294.  
  3295.                ----pppp   The output of this command,  if  any,  is  written
  3296.                     onto  the two-way pipe.  TTTThhhhiiiissss ooooppppttttiiiioooonnnn hhhhaaaassss nnnnoooo eeeeffffffffeeeecccctttt
  3297.                     iiiinnnn tttthhhheeee SSSShhhheeeellllllll.
  3298.  
  3299.                ----rrrr   The given names  are  marked  readonly  and  these
  3300.                     names cannot be changed by subsequent assignment.
  3301.  
  3302.                ----tttt   Tags the named parameters. Tags are user definable
  3303.                     and have no special meaning to the shell.
  3304.  
  3305.                ----uuuu   All lower-case characters are converted to  upper-
  3306.                     case  characters.   The  lower-case  flag,  ----llll  is
  3307.                     turned off.
  3308.  
  3309.                ----xxxx   The given names are marked for automatic export to
  3310.                     the environment of subsequently-executed commands.
  3311.  
  3312.                Using + rather than - causes these flags to  be  turned
  3313.                off.   If  no  name  arguments  are given but flags are
  3314.                specified, a list of names (and optionally the  values)
  3315.                of  the  parameters  which  have  these  flags  set  is
  3316.                printed.  (Using + rather than - keeps the values to be
  3317.                printed.)   If  no names and flags are given, the names
  3318.                and attributes of all parameters are printed.
  3319.  
  3320.           uuuummmmaaaasssskkkk [ _n_n_n ]
  3321.                The  user  file-creation  mask  is  set  to  _n_n_n   (see
  3322.                _u_m_a_s_k(2)).  If _n_n_n is omitted, the current value of the
  3323.                mask is printed.
  3324.  
  3325.           uuuunnnnaaaalllliiiiaaaassss _n_a_m_e ...
  3326.  
  3327.  
  3328.  
  3329.      Page 52                                         (printed 6/30/94)
  3330.  
  3331.  
  3332.  
  3333.  
  3334.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  3335.  
  3336.  
  3337.  
  3338.                The aliases given by the list of _n_a_m_es are removed from
  3339.                the alias list.
  3340.  
  3341.           uuuunnnnffffuuuunnnnccccttttiiiioooonnnn _n_a_m_e ...
  3342.                For each _n_a_m_e, remove the corresponding function.
  3343.  
  3344.           uuuunnnnsssseeeetttt [ ----ffff ] _n_a_m_e ...
  3345.                The  parameters  given  by  the  list  of   _n_a_m_es   are
  3346.                unassigned  (their  values  and attributes are erased).
  3347.                The following variables, as well as those with a  read-
  3348.                only  attribute  cannot  be  unset: PPPPAAAATTTTHHHH, PPPPSSSS1111, PPPPSSSS2222, and
  3349.                IIIIFFFFSSSS.  If the -f flag is set, then the  names  refer  to
  3350.                function names and the functions are removed.
  3351.  
  3352.                Unsetting LLLLIIIINNNNEEEENNNNOOOO, MMMMAAAAIIIILLLLCCCCHHHHEEEECCCCKKKK,  OOOOPPPPTTTTAAAARRRRGGGG,  OOOOPPPPTTTTIIIINNNNDDDD,  RRRRAAAANNNNDDDDOOOOMMMM,
  3353.                SSSSEEEECCCCOOOONNNNDDDDSSSS,  and  ____  removes their special meaning even if
  3354.                they are subsequently assigned to.
  3355.  
  3356.           vvvveeeerrrr  Display the current version of the shell.
  3357.  
  3358.           wwwwaaaaiiiitttt [ jjjjoooobbbb ]
  3359.                This command (which is only available under OOOOSSSS////2222) waits
  3360.                for  the  specified  _j_o_b  to  terminate  and report its
  3361.                status.  This status becomes the return  code  for  the
  3362.                wwwwaaaaiiiitttt  command.  If _j_o_b is not given, wwwwaaaaiiiitttt waits for all
  3363.                currently active child  processes  to  terminate.   The
  3364.                termination   status  returned  is  that  of  the  last
  3365.                process.  See JJJJoooobbbbssss for a description of the format of a
  3366.                _j_o_b.
  3367.  
  3368.           wwwwhhhheeeennnncccceeee [ ----ppppttttvvvv ] [ _n_a_m_e ... ]
  3369.           ttttyyyyppppeeee [ ----pppptttt ] [ _n_a_m_e ... ]
  3370.                For each _n_a_m_e  specified,  indicate  how  it  would  be
  3371.                interpreted  if used as a command name.  Note that ttttyyyyppppeeee
  3372.                is a shorthand for wwwwhhhheeeennnncccceeee ----vvvv.   If  the  -_t  option  is
  3373.                used, the shell will report the executable type of _n_a_m_e
  3374.                (MS Windows, Character-based, MS-DOS, OS/2, MS  Windows
  3375.                NT, etc).
  3376.  
  3377.                ----pppp   Does a path search for _n_a_m_e even if the name is an
  3378.                     alias, a function, or a reserved word.
  3379.  
  3380.                ----vvvv   Produces a more verbose report.
  3381.  
  3382.         IIIInnnnvvvvooooccccaaaattttiiiioooonnnn
  3383.           If the shell  is  invoked  through  _e_x_e_c(2)  and  the  first
  3384.           character of argument zero is ---- or the ----0000(zero) switch is in
  3385.           the  invocation  line,  commands  are  initially  read  from
  3386.           ////eeeettttcccc////pppprrrrooooffffiiiilllleeee  (the  extensions  ....sssshhhh or ....kkkksssshhhh may be used) and
  3387.           from $$$$HHHHOOOOMMMMEEEE////pppprrrrooooffffiiiilllleeee (the extensions rrrreeeeaaaadddd ffffrrrroooommmm tttthhhheeee ffffiiiilllleeee  nnnnaaaammmmeeeedddd
  3388.           bbbbyyyy  ppppeeeerrrrffffoooorrrrmmmmiiiinnnngggg  ppppaaaarrrraaaammmmeeeetttteeeerrrr  ssssuuuubbbbssssttttiiiittttuuuuttttiiiioooonnnn  oooonnnn tttthhhheeee vvvvaaaalllluuuueeee ooooffff tttthhhheeee
  3389.           eeeennnnvvvviiiirrrroooonnnnmmmmeeeennnntttt ppppaaaarrrraaaammmmeeeetttteeeerrrr EEEENNNNVVVV if the file  exists.   Thereafter,
  3390.  
  3391.  
  3392.  
  3393.      Page 53                                         (printed 6/30/94)
  3394.  
  3395.  
  3396.  
  3397.  
  3398.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  3399.  
  3400.  
  3401.  
  3402.           commands are read as described below, which is also the case
  3403.           when the shell is invoked as ////bbbbiiiinnnn////sssshhhh.  The flags  below  are
  3404.           interpreted  by  the  shell  on  invocation  only; Note that
  3405.           unless the ----cccc or ----ssss flag is specified, the first argument is
  3406.           assumed  to  be  the name of a file containing commands, and
  3407.           the remaining arguments are passed as positional  parameters
  3408.           to that command file:
  3409.  
  3410.           ----cccc string If the ----cccc flag is present commands are  read  from
  3411.                     _s_t_r_i_n_g.
  3412.  
  3413.           ----ssss        If the ----ssss flag  is  present  or  if  no  arguments
  3414.                     remain  commands are read from the standard input.
  3415.                     Any remaining  arguments  specify  the  positional
  3416.                     parameters.   Shell  output  (except  for  _S_p_e_c_i_a_l
  3417.                     _C_o_m_m_a_n_d_s) is written to file descriptor 2.
  3418.  
  3419.           ----iiii        If the ----iiii flag is present or if  the  shell  input
  3420.                     and  output are attached to a terminal, this shell
  3421.                     is  _i_n_t_e_r_a_c_t_i_v_e.   In  this  case,  the  TERMINATE
  3422.                     signal  is  ignored  and  the  INTERRUPT signal is
  3423.                     caught and ignored.  In all cases, the QUIT signal
  3424.                     is ignored by the shell.
  3425.  
  3426.           ----rrrr        If  the  ----rrrr  flag  is  present,  the  shell  is  a
  3427.                     restricted shell.
  3428.  
  3429.           ----0000(zero)  If the ----0000(zero) flag is present, this has the same
  3430.                     effect  as  starting  the  shell  with  the  first
  3431.                     character of argument zero as a ---- (see above).
  3432.  
  3433.           ----DDDD variable=value
  3434.                     This option  allows  the  setting  of  environment
  3435.                     variables  at  the start of the shell's execution.
  3436.                     These variables are set up  after  the  shell  has
  3437.                     read  the  current environment.  The option allows
  3438.                     the user to change the value of  variable  in  the
  3439.                     environment    without   changing   the   parent's
  3440.                     environment.  Under UNIX,  this  functionality  is
  3441.                     unnecessary.  However, MS-DOS, OS/2 and MS Windows
  3442.                     NT do not provide the necessary  functionality  to
  3443.                     allow  the  setting  of  variables  just  for  one
  3444.                     particular program.
  3445.  
  3446.           ----PPPP        This option enables real pipes  under  OOOOSSSS////2222.   See
  3447.                     LLLLIIIIMMMMIIIITTTTAAAATTTTIIIIOOOONNNNSSSS.
  3448.  
  3449.           ----RRRR        If the ----RRRR flag is present, the shell is  the  _r_o_o_t
  3450.                     shell  and cannot be terminated using exit.  Under
  3451.                     MMMMSSSS----DDDDOOOOSSSS, the system must be re-booted.  Under OOOOSSSS////2222,
  3452.                     the  shell  must be killed by an external program.
  3453.                     In addition, the initialisation file is  not  read
  3454.  
  3455.  
  3456.  
  3457.      Page 54                                         (printed 6/30/94)
  3458.  
  3459.  
  3460.  
  3461.  
  3462.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  3463.  
  3464.  
  3465.  
  3466.                     until  just before the first keyboard input.  This
  3467.                     allows the location of the file to be  changed  by
  3468.                     changing   the  value  of  the  SHELL  environment
  3469.                     variable.
  3470.  
  3471.           ----XXXX directory
  3472.                     If the ----XXXX flag is present, the following _d_i_r_e_c_t_o_r_y
  3473.                     defines  the startup directory for the shell.  The
  3474.                     shell immediately changes to this directory.
  3475.  
  3476.           The remaining flags and arguments are  described  under  the
  3477.           sssseeeetttt command above.
  3478.  
  3479.         RRRRsssshhhh OOOOnnnnllllyyyy
  3480.           _R_s_h is used to set up login names and execution environments
  3481.           whose  capabilities  are  more  controlled than those of the
  3482.           standard shell.  The actions of _r_s_h are identical  to  those
  3483.           of _s_h, except that the following are disallowed:
  3484.  
  3485.                Changing directory (see _c_d(1)),
  3486.                Setting the value of SSSSHHHHEEEELLLLLLLL, EEEENNNNVVVV, or $$$$PPPPAAAATTTTHHHH,
  3487.                Specifying path or command names containing ////,
  3488.                Redirecting output (>>>> and >>>>>>>>).
  3489.  
  3490.           The restrictions above are enforced after  pppprrrrooooffffiiiilllleeee  and  the
  3491.           EEEENNNNVVVV files are interpreted.
  3492.  
  3493.           When a command to  be  executed  is  found  to  be  a  shell
  3494.           procedure,  _r_s_h  invokes  _s_h  to  execute  it.   Thus, it is
  3495.           possible to provide to the end-user  shell  procedures  that
  3496.           have  access  to the full power of the standard shell, while
  3497.           imposing a limited menu of  commands;  this  scheme  assumes
  3498.           that   the   end-user   does  not  have  write  and  execute
  3499.           permissions in the same directory.
  3500.  
  3501.           The net effect of these rules is  that  the  writer  of  the
  3502.           pppprrrrooooffffiiiilllleeee   has   complete   control  over  user  actions,  by
  3503.           performing guaranteed setup actions and leaving the user  in
  3504.           an appropriate directory (probably _n_o_t the login directory).
  3505.  
  3506.           The system  administrator  often  sets  up  a  directory  of
  3507.           commands  (i.e.,  ////uuuussssrrrr////rrrrbbbbiiiinnnn)  that  can be safely invoked by
  3508.           _r_s_h.  Some systems also provide a restricted editor _r_e_d.
  3509.  
  3510.      EEEEXXXXIIIITTTT SSSSTTTTAAAATTTTUUUUSSSS
  3511.           Errors detected by the shell, such as syntax  errors,  cause
  3512.           the shell to return a non-zero exit status.  If the shell is
  3513.           being used non-interactively execution of the shell file  is
  3514.           abandoned.   Otherwise, the shell returns the exit status of
  3515.           the last command executed (see also the eeeexxxxiiiitttt command above).
  3516.  
  3517.      FFFFIIIILLLLEEEESSSS
  3518.  
  3519.  
  3520.  
  3521.      Page 55                                         (printed 6/30/94)
  3522.  
  3523.  
  3524.  
  3525.  
  3526.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  3527.  
  3528.  
  3529.  
  3530.           /etc/profile
  3531.           $HOME/profile
  3532.           $HOME/history.sh.
  3533.           $TMP/sh*.tmp
  3534.           ??/sh.ini
  3535.  
  3536.      CCCCRRRRIIIITTTTIIIICCCCAAAALLLL EEEERRRRRRRROOOORRRRSSSS
  3537.           The Shell provide a Critical Error  Handler  (Interrupt  24)
  3538.           similar  to the standard MMMMSSSS----DDDDOOOOSSSS handler.  In addition to the
  3539.           standard message, the handler  also  displays  the  Extended
  3540.           Error Code information in hexadecimal.
  3541.  
  3542.      LLLLIIIIMMMMIIIITTTTAAAATTTTIIIIOOOONNNNSSSS
  3543.           Under MS-DOS, any TSR  (Terminate  Stay  Resident)  programs
  3544.           must be loaded before loading _S_h as the shell will overwrite
  3545.           the TSR when it reloads itself after swapping out.
  3546.  
  3547.           The shell checks for valid DOS filenames (single dot, not at
  3548.           the beginning).  Invalid dots are converted to ~~~~.  A warning
  3549.           message is displayed if the shell detects  an  invalid  file
  3550.           name.
  3551.  
  3552.           Under OOOOSSSS////2222, asynchronous commands are supported to a degree.
  3553.           However,  this  is very limited because of the nature of the
  3554.           forking commands under OOOOSSSS////2222 which does not  match  the  UUUUNNNNIIIIXXXX
  3555.           model.   This  difference  has  also meant that pipes (as in
  3556.           MS-DOS) are implemented as files and not  OOOOSSSS////2222  pipes.   For
  3557.           more details, see the source code.
  3558.  
  3559.           However, real OOOOSSSS////2222 pipes can be used with  care  for  simple
  3560.           pipelines  which  do  not create sub-shells or assume that a
  3561.           real child shell is  created  because  the  shell  does  not
  3562.           create  child,  it  simulates  their  creating  in  the same
  3563.           process.  This is because there is no fork under OOOOSSSS////2222.   See
  3564.           the sssseeeetttt command on how to enable/disable real pipes.
  3565.  
  3566.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  3567.           cd(1), test(1), umask(1),
  3568.           exec(2),   pipe(2),    signal(2),    umask(2),    strtol(3),
  3569.           profile(4),   environ(5)   in  the  _U_N_I_X  _S_y_s_t_e_m  _P_r_o_g_r_a_m_m_e_r
  3570.           _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l.
  3571.           COMMAND(1) and SUBST(1) in the _M_S-_D_O_S _R_e_f_e_r_e_n_c_e _G_u_i_d_e.
  3572.           CMD(1) in the _O_S/_2 Reference Guide.
  3573.           CMD(1) in the _M_S _W_i_n_d_o_w_s _N_T Reference Guide.
  3574.           DosStartSession(2) in the  _O_S/_2  _C_o_n_t_r_o_l  _P_r_o_g_r_a_m  _R_e_f_e_r_e_n_c_e
  3575.           _M_a_n_u_a_l.
  3576.  
  3577.      AAAACCCCKKKKNNNNOOOOWWWWLLLLEEEEDDDDGGGGEEEEMMMMEEEENNNNTTTTSSSS
  3578.           This program is based  on  ideas,  code  or  parts  of  code
  3579.           developed by:
  3580.  
  3581.           David Korn and Steve Bourne (the original ideas)
  3582.  
  3583.  
  3584.  
  3585.      Page 56                                         (printed 6/30/94)
  3586.  
  3587.  
  3588.  
  3589.  
  3590.      SSSSHHHH((((1111LLLL))))          LLLLOOOOCCCCAAAALLLL ((((MMMMSSSS----DDDDOOOOSSSS ---- OOOOSSSS////2222 VVVVeeeerrrrssssiiiioooonnnn 2222....3333))))          SSSSHHHH((((1111LLLL))))
  3591.  
  3592.  
  3593.  
  3594.           Charles Forsyth (the original source  for  the  MINIX  Shell
  3595.           program)
  3596.           Erik Baalbergen (the code for the test function)
  3597.           Paul Falstad (the code for the maths functions)
  3598.           Simon J. Gerraty (the code for the new lexical analyser  and
  3599.           the VI/EMACS edit functions).
  3600.  
  3601.           In addition, a very large number  of  people  (too  many  to
  3602.           mention) who have been involved in testing and debugging the
  3603.           program.
  3604.  
  3605.  
  3606.  
  3607.  
  3608.  
  3609.  
  3610.  
  3611.  
  3612.  
  3613.  
  3614.  
  3615.  
  3616.  
  3617.  
  3618.  
  3619.  
  3620.  
  3621.  
  3622.  
  3623.  
  3624.  
  3625.  
  3626.  
  3627.  
  3628.  
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.  
  3635.  
  3636.  
  3637.  
  3638.  
  3639.  
  3640.  
  3641.  
  3642.  
  3643.  
  3644.  
  3645.  
  3646.  
  3647.  
  3648.  
  3649.      Page 57                                         (printed 6/30/94)
  3650.