home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / utility / cli / sksh017.lzh / doc / Reference.doc < prev    next >
Encoding:
Text File  |  1991-05-04  |  158.2 KB  |  10,033 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.                            Reference Manual 
  18.  
  19.                                   SKsh
  20.  
  21.                      A ksh-like Shell for the Amiga
  22.  
  23.                               Version 1.7
  24.  
  25.  
  26.                          (Copyright) 1988-1991
  27.  
  28.                               Steve Koren
  29.  
  30.                               May 4, 1991
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.        Table of Contents
  74.  
  75.  
  76.         Introduction......................................5
  77.         !, !!.............................................6
  78.         _ANSI.............................................7
  79.         _DIR_.............................................8
  80.         _FILE_............................................8
  81.         _EXEC_............................................8
  82.         alias.............................................10
  83.         aliases...........................................11
  84.         AREXX_PORT........................................12
  85.         argcount..........................................13
  86.         SKSHINIT..........................................14
  87.         sksh..............................................15
  88.         basename..........................................17
  89.         break.............................................18
  90.         BPWD..............................................19
  91.         builtins..........................................20
  92.         capital...........................................21
  93.         car...............................................22
  94.         case/esac.........................................23
  95.         cat...............................................24
  96.         cd................................................25
  97.         CDPATH............................................26
  98.         cdr...............................................27
  99.         chext.............................................28
  100.         chmod.............................................29
  101.         cilist............................................30
  102.         clear, cls........................................32
  103.         cleard............................................33
  104.         CLINUM............................................34
  105.         CMDNUM............................................35
  106.         COLUMNS...........................................36
  107.         complist..........................................37
  108.         continue..........................................39
  109.         ctpri.............................................40
  110.         date..............................................41
  111.         dec...............................................42
  112.         dir...............................................43
  113.         dirname...........................................44
  114.         DIRSTACK..........................................45
  115.         dstack............................................46
  116.         dwclist...........................................47
  117.         echo..............................................49
  118.         emacs_mode........................................50
  119.         eval..............................................51
  120.         exit..............................................52
  121.         export............................................53
  122.         false.............................................56
  123.         for/do/done.......................................57
  124.         force.............................................58
  125.         function..........................................59
  126.         functions.........................................60
  127.  
  128.  
  129.        SKsh Amiga Shell             Page 2             Reference Manual
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.         getenv............................................61
  140.         histhist..........................................62
  141.         histload..........................................63
  142.         history...........................................64
  143.         histrm............................................66
  144.         histsave..........................................67
  145.         HISTSIZE..........................................68
  146.         HOME..............................................69
  147.         IFS...............................................71
  148.         inc...............................................72
  149.         info..............................................73
  150.         INTERACTIVE.......................................74
  151.         line..............................................77
  152.         LINES.............................................78
  153.         ll................................................79
  154.         LLMIN.............................................80
  155.         local.............................................81
  156.         LOGOUT............................................82
  157.         ls................................................83
  158.         man...............................................85
  159.         MANPATH...........................................86
  160.         match.............................................87
  161.         MAXDIST...........................................88
  162.         mem...............................................89
  163.         mkdir.............................................90
  164.         mplist............................................91
  165.         mv................................................93
  166.         numloop/do/done...................................94
  167.         OLDPWD............................................95
  168.         options...........................................96
  169.         OS_VER............................................100
  170.         PAGER.............................................101
  171.         PATH..............................................102
  172.         path..............................................103
  173.         pathconv..........................................104
  174.         PNPC..............................................105
  175.         PNPC2.............................................106
  176.         popd..............................................107
  177.         preparse..........................................108
  178.         printf............................................109
  179.         ps................................................110
  180.         PS1...............................................111
  181.         PS2...............................................112
  182.         pushd.............................................113
  183.         PWD...............................................114
  184.         pwd...............................................115
  185.         qrm...............................................116
  186.         quit..............................................117
  187.         read..............................................118
  188.         RECUR_DEPTH.......................................119
  189.         resident..........................................120
  190.         return............................................121
  191.         rm................................................122
  192.         rmdir.............................................123
  193.  
  194.  
  195.        SKsh Amiga Shell             Page 3             Reference Manual
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.         ROOT..............................................124
  206.         set...............................................125
  207.         setmap............................................126
  208.         SHARED_TYPE.......................................129
  209.         SHELL.............................................130
  210.         shift.............................................131
  211.         SIZE..............................................132
  212.         sleep.............................................133
  213.         source............................................134
  214.         stack.............................................135
  215.         SYSNAME...........................................136
  216.         tackon............................................137
  217.         time..............................................138
  218.         tolower...........................................139
  219.         touch.............................................140
  220.         toupper...........................................141
  221.         true..............................................142
  222.         unalias...........................................143
  223.         unfunc............................................144
  224.         unset.............................................145
  225.         usage.............................................146
  226.         variables.........................................147
  227.         version...........................................148
  228.         vi_mode...........................................149
  229.         whence............................................150
  230.         which.............................................151
  231.         while/do/done.....................................152
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.        SKsh Amiga Shell             Page 4             Reference Manual
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.        Introduction
  272.  
  273.      This  reference manual describes each SKsh command, variable,
  274.      alias,  or  function in a concise manner.  Each page contains
  275.      the following information:
  276.  
  277.      Name:     The name of the command, alias, etc.
  278.  
  279.      Type:     Variable,  Alias,  Function,  Builtin,  Script,  or
  280.                Keyword.
  281.  
  282.      Default:  The default value for variables, or definition  for
  283.                aliases.
  284.  
  285.      Usage:    Command syntax
  286.  
  287.      Range:    Legal values for variables or parameters
  288.  
  289.      About:    Text describing the command, variable, etc.
  290.  
  291.      Example:  A brief example usage.
  292.  
  293.      See Also: Other related commands, variables, etc.
  294.  
  295.      When  reading the command syntax, anything in square brackets
  296.      is  optional.    Anything  followed by three dots can be  re-
  297.      peated any  number of times.  A vertical bar is used to sepa-
  298.      rate  option where one or the other, but  not  both,  can  be
  299.      used.
  300.  
  301.      In  general,  options to  commands are preceded by a dash ('-
  302.      ').  The dash  character passed alone tells a command to stop
  303.      reading  options.   This  can  be  useful to pass a dash as a
  304.      parameter.  For example,
  305.  
  306.              echo - -
  307.  
  308.      would print a single dash.  Also,  'command -a -b' is equiva-
  309.      lent to 'command -ab'.
  310.  
  311.      In  version 1.4 and later of SKsh, the  documentation for ex-
  312.      ternal  binary  commands has been moved  to  the  ExtCmds.doc
  313.      file.
  314.  
  315.      In version 1.7 and later, commands will print usage  messages
  316.      if passed '-?' as a single parameter. 
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.        SKsh Amiga Shell             Page 5             Reference Manual
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.        _________________________________________________________________
  338.  
  339.      Name:     !, !!
  340.  
  341.      Type:     Alias
  342.  
  343.      Default:  history -e
  344.                history -e -1
  345.  
  346.      Usage:    ! [ pattern | abs_num | rel_num ]
  347.                !!
  348.  
  349.      Range:    n/a
  350.  
  351.      About:    These  two  aliases  provide an easy way to use the
  352.                history  -e  command.  !! will execute the previous
  353.                command from the  history list by executing history
  354.                -e  -1.    ! will  execute a specified command from
  355.                the  history list.  This command can either specify
  356.                an  absolute  number,  a  relative  offset from the
  357.                most  recent  command  (the  offset should be nega-
  358.                tive), or a  partial line or pattern to search for.
  359.                If  a  search  pattern is given, it should  be  en-
  360.                closed in quotes so  that  SKsh  does  not  attempt
  361.                file name generation on the wildcard pattern.
  362.  
  363.      Example:  ! cc
  364.  
  365.      See Also: history
  366.  
  367.        _________________________________________________________________
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.        SKsh Amiga Shell             Page 6             Reference Manual
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.        _________________________________________________________________
  404.  
  405.      Name:     _ANSI_BS
  406.                _ANSI_BE
  407.                _ANSI_IS
  408.                _ANSI_IE
  409.                _ANSI_US
  410.                _ANSI_UE
  411.                _ANSI_P1
  412.                _ANSI_P2
  413.                _ANSI_P3
  414.                _ANSI_CLEAR
  415.  
  416.      Type:     Variable
  417.  
  418.      Default:  "^[[1m"                (bold-start)
  419.                "^[[m"                 (bold-end)
  420.                "^[[3m"                (italic-start)
  421.                "^[[m"                 (italic-end)
  422.                "^[[4m"                (underline-start)
  423.                "^[[m"                 (underline-end)
  424.                "^[[0;31;40m"          (pen-1)
  425.                "^[[0;32;40m"          (pen-2)
  426.                "^[[0;33;40m"          (pen-3)
  427.                "^[[H^[[2J"            (clear screen)
  428.  
  429.      Usage:    $_ANSI_??
  430.  
  431.      Range:    n/a
  432.  
  433.      About:    These  variables are set by SKsh to valid ANSI  es-
  434.                cape  sequences  which  control the  Amiga  console
  435.                device.  They can be  used  in  echo  statements or
  436.                prompts.
  437.  
  438.                Since  these  variables,  when  output,  affect the
  439.                console  device, they are not normally displayed by
  440.                the set command.
  441.  
  442.      Example:  echo $_ANSI_CLEAR      # clear the screen
  443.  
  444.      See Also: echo
  445.  
  446.        _________________________________________________________________
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.        SKsh Amiga Shell             Page 7             Reference Manual
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.        _________________________________________________________________
  470.  
  471.      Name:     _DIR_S
  472.                _DIR_E
  473.                _DIR_L
  474.                _FILE_S
  475.                _FILE_E
  476.                _DIR_L
  477.                _EXEC_S
  478.                _EXEC_E
  479.                _EXEC_L
  480.  
  481.      Type:     Variable
  482.  
  483.      Default:  "$_ANSI_P3"            (dir-start)
  484.                "$_ANSI_P1"            (dir-end)
  485.                0                      (dir-length)
  486.                NULL                   (file-start)
  487.                NULL                   (file-end)
  488.                0                      (file-length)
  489.                NULL                   (exec-start)
  490.                NULL                   (exec-end)
  491.                0                      (exec-length)
  492.  
  493.      Usage:
  494.  
  495.      Range:    n/a
  496.  
  497.      About:    These  variables  control the display format of the
  498.                'ls'  command when the '-F' option is set (as it is
  499.                by  default when the  'dir'  or  'll'  commands are
  500.                used).   Before printing each file name (whether in
  501.                a short or long  format listing), SKsh will examine
  502.                the file type.  If the it is a  directory, the con-
  503.                tents of the _DIR_S  variable is printed.  If it is
  504.                a  file,  the  contents of _FILE_S is printed.   If
  505.                the 'e' bit is set, _EXEC_S is  printed.   (Because
  506.                of this, it  is  possible to print more than one of
  507.                the above  variables if the name is both a file and
  508.                has its 'e' bit set).
  509.  
  510.                In a  similar manner, the contents of the appropri-
  511.                ate  _FILE_E,  _DIR_E,  and  _EXEC_E  variables  is
  512.                printed  after the file name.  This allows the for-
  513.                mat of the directory listing to be customized.
  514.  
  515.                These  variables are only  output when the '-F' op-
  516.                tion  is  used.   Also,  their  contents is printed
  517.                verbatim; it is not  expanded as with 'PS1'.  Thus,
  518.                any  variables should be  expanded when these vari-
  519.                ables are set, as in the example below.
  520.  
  521.                The _DIR_L, _EXEC_L,  and  _FILE_L  variables store
  522.                integers  which   should   represent  the  printing
  523.  
  524.  
  525.        SKsh Amiga Shell             Page 8             Reference Manual
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.                length of the _DIR_S, _DIR_E, etc variables.   This
  536.                lets  the  ls  command correctly judge the width of
  537.                the  display.   The  _L  variables should store the
  538.                combined  printing length of both  the  _S  and  _E
  539.                variables.   For  example, if _DIR_S has a printing
  540.                length of 1 and _DIR_E has a  printing length of 2,
  541.                _DIR_L would be set to 3.
  542.  
  543.      Example:  _FILE_S="$_ANSI_US"   # underline file names
  544.                _FILE_E="$_ANSI_UE"
  545.  
  546.                _DIR_S=''     # print highlighed / after dirs
  547.                _DIR_E="$_ANSI_P3/$_ANSI_P1"
  548.                _DIR_L=1
  549.  
  550.      See Also: ls, dir, ll
  551.  
  552.        _________________________________________________________________
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.        SKsh Amiga Shell             Page 9             Reference Manual
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.        _________________________________________________________________
  602.  
  603.      Name:     alias
  604.  
  605.      Type:     Builtin
  606.  
  607.      Default:  n/a
  608.  
  609.      Usage:    alias [ -t ] [ pattern | string [ '=' ] string ]
  610.  
  611.      Range:    n/a
  612.  
  613.      About:    The alias  builtin command (not to be confused with
  614.                'aliases',  which  is  itself an  alias) is used to
  615.                set and list aliases.  If given  no  parameters, it
  616.                simply acts as a 'set -a' command.   If  given  one
  617.                parameter, which is  a  pattern, all aliases match-
  618.                ing that  pattern are printed.  If given two param-
  619.                eters (or  there  where  the  second is a '='), the
  620.                first  string  becomes an  alias  with  the  second
  621.                string as its definition.
  622.  
  623.                Aliases  are  expanded when used as a command.  Any
  624.                arguments  are  appended to the text of the aliases
  625.                and the resulting string is executed.
  626.  
  627.                Unlike  ksh and sh, there can be spaces surrounding
  628.                the '=' sign, which is itself optional.
  629.  
  630.                The  -t  option causes the alias command to use the
  631.                top  level  symbol table to find aliases.  This  is
  632.                useful with the shared SKsh modes.
  633.  
  634.      Example:  alias foo='echo "This is the foo alias"'
  635.  
  636.      See Also: set, alias, unalias
  637.  
  638.        _________________________________________________________________
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.        SKsh Amiga Shell            Page 10             Reference Manual
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.        _________________________________________________________________
  668.  
  669.      Name:     aliases
  670.  
  671.      Type:     Alias
  672.  
  673.      Default:  set -a
  674.  
  675.      Usage:    aliases [-s] [pattern]
  676.  
  677.      Range:    n/a
  678.  
  679.      About:    This  alias  lists  defined aliases.   The  pattern
  680.                uses  normal wildcards, but must be quoted to avoid
  681.                being   interpreted  by  the   filename   expansion
  682.                mechanism.  If the  pattern is omitted, all aliases
  683.                in the  current context are listed except those be-
  684.                ginning with an underscore (hidden aliases).
  685.  
  686.                Only aliases  for  the  current context are listed,
  687.                so this  command may have a different effect inside
  688.                of   a   subshell  or   function  than  when  typed
  689.                manually.
  690.  
  691.      Example:  aliases -s '[a-h]*'
  692.  
  693.      See Also: set, alias
  694.  
  695.        _________________________________________________________________
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.        SKsh Amiga Shell            Page 11             Reference Manual
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.        _________________________________________________________________
  734.  
  735.      Name:     AREXX_PORT
  736.  
  737.      Type:     Variable
  738.  
  739.      Default:  SKSH or SKSH_$CLINUM
  740.                unset if no ARexx port available
  741.  
  742.      Usage:    $AREXX_PORT
  743.  
  744.      Range:    n/a
  745.  
  746.      About:    This variable contains the name of the  ARexx  port
  747.                opened by SKsh open invocation.  The variable  will
  748.                be unset  if  SKsh  did  not  open  an  ARexx  port
  749.                (either because it was told not  to,  or  it  could
  750.                not because ARexx was not installed).
  751.  
  752.      Example:  if [ -z "$AREXX_PORT" ]
  753.                then
  754.                   echo "This SKsh does not have an ARexx port"
  755.                else
  756.                   echo "The ARexx port name is $AREXX_PORT"
  757.                fi
  758.  
  759.      See Also: sksh
  760.                UserMan.doc:
  761.                Advanced Topics: Using SKsh with ARexx
  762.  
  763.        _________________________________________________________________
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.        SKsh Amiga Shell            Page 12             Reference Manual
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.        _________________________________________________________________
  800.  
  801.      Name:     argcount
  802.  
  803.      Type:     Builtin
  804.  
  805.      Default:  n/a
  806.  
  807.      Usage:    argcount [ parameter ... ]
  808.  
  809.      Range:    n/a
  810.  
  811.      About:    argcount simply prints a count of its arguments.
  812.  
  813.      Example:  argcount should 'print two'
  814.  
  815.      See Also:
  816.  
  817.        _________________________________________________________________
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.        SKsh Amiga Shell            Page 13             Reference Manual
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.        _________________________________________________________________
  866.  
  867.      Name:     SKSHINIT
  868.  
  869.      Type:     Variable
  870.  
  871.      Default:  "sksh:.skshrc"
  872.  
  873.      Usage:    $SKSHINIT
  874.  
  875.      Range:    n/a
  876.  
  877.      About:    This  variable is set in the .skshinit file to  the
  878.                name  of  a  user  modifiable  configuration  file.
  879.                Normally this is "s:.skshrc".  The user  configura-
  880.                tion file is sourced  (not  executed!) for interac-
  881.                tive SKsh sessions.
  882.  
  883.                The   s:.skshrc   file   is   provided   for   user
  884.                modification.        Users   should   not    modify
  885.                s:.skshinit.  If you wish to change  something that
  886.                is  defined in  s:.skshinit,  simply redefine it in
  887.                s:.skshrc.     s:.skshrc    is    sourced     after
  888.                s:.skshinit.
  889.  
  890.                Your  s:.skshrc  file  may  optionally source other
  891.                files.
  892.  
  893.                In SKsh 1.5 and later, the preparsed form  of  this
  894.                file will  be  executed if it exists instead of the
  895.                ascii form.
  896.  
  897.      Example:
  898.  
  899.      See Also: sksh, source, preparse
  900.  
  901.        _________________________________________________________________
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.        SKsh Amiga Shell            Page 14             Reference Manual
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.        _________________________________________________________________
  932.  
  933.      Name:     sksh
  934.  
  935.      Type:     External Command
  936.  
  937.      Default:  n/a
  938.  
  939.      Usage:    sksh [ -n ] [ -a | -p portname ]
  940.                     [ -c string | fspec... ]
  941.  
  942.      Range:    n/a
  943.  
  944.      About:    This is, of course, the main SKsh binary.   If  in-
  945.                voked with no  parameters, an interactive SKsh ses-
  946.                sion is started.   If  invoked with the '-c' option
  947.                followed by a string,  the  string  is  executed by
  948.                SKsh as if it had been typed, and  SKsh  exits when
  949.                the  operation is complete.  If the string contains
  950.                spaces, it must  be  surrounded by quotes (although
  951.                this  depends  on  the  invoking shell or  environ-
  952.                ment).   If   invoked with filespec arguments, each
  953.                file in turn is  executed (not sourced).  SKsh then
  954.                exits when finished executing all the files.
  955.  
  956.                If  SKsh  is  invoked  non-interactively,  it  will
  957.                still read the .skshinit file, but not the  .skshrc
  958.                file.   This   allows you to have output statements
  959.                in the .skshrc file  without having this output ap-
  960.                pear when non-interacrive scripts are run.  If  you
  961.                really want to run the .skshrc file first, use:
  962.  
  963.                   sksh s:.skshrc my_file.sksh
  964.  
  965.                If SKsh is given the "-a" flag upon  invocation, it
  966.                attempts to open an ARexx port if ARexx  is  indeed
  967.                installed on the system.  The  default port name is
  968.                "SKSH" (all caps).  If this port is taken  (perhaps
  969.                by  another  invocation of SKsh),  SKsh  appends an
  970.                underscore and the cli  number of this process (for
  971.                example, "SKSH_5"), and tries again.  If  it  still
  972.                cannot open the port, it gives up.
  973.  
  974.                If the "-p" flag is given  followed by a port name,
  975.                SKsh  will  attempts to use the  following argument
  976.                as a portname when opening ARexx.
  977.  
  978.                If the "-n" flag is given, SKsh will  read  neither
  979.                the .skshrc file nor the .skshinit file.   This  is
  980.                not  generally useful for interactive sessions, but
  981.                may  be  useful to execute a simple non-interactive
  982.                script which does not  need  .skshrc  or  .skshinit
  983.                initialization.
  984.  
  985.  
  986.  
  987.        SKsh Amiga Shell            Page 15             Reference Manual
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.      Example:  sksh -c "expr 21 * 2"
  998.  
  999.      See Also: source, AREXX_PORT
  1000.  
  1001.        _________________________________________________________________
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.        SKsh Amiga Shell            Page 16             Reference Manual
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.        _________________________________________________________________
  1064.  
  1065.      Name:     basename
  1066.  
  1067.      Type:     Builtin
  1068.  
  1069.      Default:  n/a
  1070.  
  1071.      Usage:    basename [ fspec ... ]
  1072.  
  1073.      Range:    n/a
  1074.  
  1075.      About:    basename prints the "base" name of  a  given  path.
  1076.                For  example, the basename of  sys:System/Format is
  1077.                simply Format.  Note that the  basename  may  be  a
  1078.                directory  and  not  a  file;   for   example,  the
  1079.                basename of sys:usr/bin is bin, even though bin  is
  1080.                a directory.   If  basename is passed more than one
  1081.                parameter, it prints the basename  of  each  param-
  1082.                eter in turn.
  1083.  
  1084.      Example:  basename sys:usr/bin/wc
  1085.  
  1086.      See Also: dirname, extname
  1087.  
  1088.        _________________________________________________________________
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.        SKsh Amiga Shell            Page 17             Reference Manual
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.        _________________________________________________________________
  1130.  
  1131.      Name:     break
  1132.  
  1133.      Type:     Builtin
  1134.  
  1135.      Default:  n/a
  1136.  
  1137.      Usage:    break [ num ]
  1138.  
  1139.      Range:    n/a
  1140.  
  1141.      About:    break  exits  gracefully from  an  enclosing for or
  1142.                while  loop.   If  a  numeric argument is given, it
  1143.                breaks from  that  many  enclosing levels of for or
  1144.                while.
  1145.  
  1146.      Example:  for a in a b c d e f
  1147.                do
  1148.                   echo $a
  1149.                   if [ "$a" = "c" ] then break; fi
  1150.                done
  1151.  
  1152.      See Also: continue
  1153.  
  1154.        _________________________________________________________________
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.        SKsh Amiga Shell            Page 18             Reference Manual
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.        _________________________________________________________________
  1196.  
  1197.      Name:     BPWD
  1198.  
  1199.      Type:     Variable
  1200.  
  1201.      Default:  base name of present working directory
  1202.  
  1203.      Usage:    $BPWD
  1204.  
  1205.      Range:    n/a
  1206.  
  1207.      About:    This  variable  is  similar to $PWD, but holds only
  1208.                the  basename  of  the  present  working directory.
  1209.                This is sometimes useful to imbed in prompts.
  1210.  
  1211.      Example:  echo "basename of PWD = $BPWD"
  1212.  
  1213.      See Also: OLDPWD, PWD, pwd, cd
  1214.  
  1215.        _________________________________________________________________
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.        SKsh Amiga Shell            Page 19             Reference Manual
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.        _________________________________________________________________
  1262.  
  1263.      Name:     builtins
  1264.  
  1265.      Type:     Alias
  1266.  
  1267.      Default:  set -b
  1268.  
  1269.      Usage:    builtins [ -s ] [ pattern ]
  1270.  
  1271.      Range:    n/a
  1272.  
  1273.      About:    This  aliases  lists  SKsh  builtin commands.   The
  1274.                pattern  uses  normal wildcards, but must be quoted
  1275.                to  avoid  being interpreted by the filename expan-
  1276.                sion  mechanism.   If  the  pattern is omitted, all
  1277.                builtins are listed  except those beginning with an
  1278.                underscore  character (hidden builtins).  There are
  1279.                currently no hidden builtins.
  1280.  
  1281.      Example:  builtins -s '[a-h]*'
  1282.  
  1283.      See Also: set
  1284.  
  1285.        _________________________________________________________________
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.        SKsh Amiga Shell            Page 20             Reference Manual
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.        _________________________________________________________________
  1328.  
  1329.      Name:     capital
  1330.  
  1331.      Type:     Builtin
  1332.  
  1333.      Default:  n/a
  1334.  
  1335.      Usage:    capital [ -nc ] [ parameter ... ]
  1336.  
  1337.      Range:    n/a
  1338.  
  1339.      About:    This  command  echos  its  arguments,  converting  the
  1340.                first  character of each  argument to upper case if it
  1341.                is a lower case  character.   The  -n  option will not
  1342.                append a newline, and the  -c  option will concatenate
  1343.                arguments, similar to echo.
  1344.  
  1345.      Example:  capital 'Arguments' 'are' 'all' 'Capitalized'
  1346.  
  1347.      See Also: toupper, tolower, echo
  1348.  
  1349.        _________________________________________________________________
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.        SKsh Amiga Shell            Page 21             Reference Manual
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.        _________________________________________________________________
  1394.  
  1395.      Name:     car
  1396.  
  1397.      Type:     Builtin
  1398.  
  1399.      Default:  n/a
  1400.  
  1401.      Usage:    car string [ sep_char ]
  1402.  
  1403.      Range:    n/a
  1404.  
  1405.      About:    car  provides a lisp-like car function which can be
  1406.                used   to   extract  items  from  lists  stored  in
  1407.                strings.    car  examines the string, and  extracts
  1408.                the first  item  separated by sep_char, which is by
  1409.                default a space.  If given a  second argument, that
  1410.                is used in as sep_char in place of a space.
  1411.  
  1412.      Example:  mystring='item1,item2,item3,item4,item5,item6'
  1413.                firstitem=$(car "$mystring" ',')
  1414.  
  1415.      See Also: cdr
  1416.  
  1417.        _________________________________________________________________
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.        SKsh Amiga Shell            Page 22             Reference Manual
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.        _________________________________________________________________
  1460.  
  1461.      Name:     case/esac
  1462.  
  1463.      Type:     Keywords
  1464.  
  1465.      Default:  n/a
  1466.  
  1467.      Usage:    case param in { pattern ) stmt_list ;; } ... esac
  1468.  
  1469.      Range:    n/a
  1470.  
  1471.      About:    If  the  supplied  parameter  matches  any  of  the
  1472.                (wildcard)  patterns, then  the  statement list for
  1473.                that  pattern is executed.  A close-paren (  ")"  )
  1474.                must  follow  the  wildcard  pattern, and a  double
  1475.                semicolon  must  terminate the statement list.  The
  1476.                case  statement  must  be  terminated by a matching
  1477.                esac keyword.
  1478.  
  1479.      Example:  case "$foo" in
  1480.                  bar)  echo "Matched bar";
  1481.                        echo "testing..." ;;
  1482.                  n*t)  echo "Matched n*t";;
  1483.                  a??c) echo "Matched a??c";;
  1484.                esac
  1485.  
  1486.      See Also:
  1487.  
  1488.        _________________________________________________________________
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.        SKsh Amiga Shell            Page 23             Reference Manual
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.        _________________________________________________________________
  1526.  
  1527.      Name:     cat
  1528.  
  1529.      Type:     Builtin
  1530.  
  1531.      Default:  n/a
  1532.  
  1533.      Usage:    cat [ fspec ... ]
  1534.  
  1535.      Range:    n/a
  1536.  
  1537.      About:    cat prints  the  contents of each file passed to it
  1538.                on  the  command line, or the  standard input if no
  1539.                files are  passed.   The  contents of each file are
  1540.                concatenated,  and  are  not   separated  by  blank
  1541.                lines.
  1542.  
  1543.                In SKsh 1.5 and later, there are two forms  of  the
  1544.                cat  command,  a  builtin and  an  external binary.
  1545.                The   external   binary   is   described   in   the
  1546.                ExtCmds.doc file.  It can be made the  default; see
  1547.                the documentation there for details.
  1548.  
  1549.                In SKsh, the  builtin  cat cannot be used to trans-
  1550.                fer  binary files, only ASCII data.  Also, the  se-
  1551.                quence:
  1552.  
  1553.                   cat my_file.txt > my_file1.txt
  1554.  
  1555.                can be  faster  accomplished with the cp command or
  1556.                the external cat command.
  1557.  
  1558.      Example:  cat my_file.txt
  1559.  
  1560.      See Also: cp
  1561.                The cat entry in the ExtCmds.doc file
  1562.  
  1563.        _________________________________________________________________
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.        SKsh Amiga Shell            Page 24             Reference Manual
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.        _________________________________________________________________
  1592.  
  1593.      Name:     cd
  1594.  
  1595.      Type:     Builtin
  1596.  
  1597.      Default:  n/a
  1598.  
  1599.      Usage:    cd [ -p | dirname ]
  1600.  
  1601.      Range:    n/a
  1602.  
  1603.      About:    cd  changes   the   current  working  directory  to
  1604.                dirname,  or  to  the  previous directory (the con-
  1605.                tents  of  the  OLDPWD  variable) if the -p flag is
  1606.                set.  If no  parameters are passed, cd moves to the
  1607.                directory  indicated by the HOME variable.  This is
  1608.                convenient when you are  doing most of your work in
  1609.                one place, and wish to  return there easily.  Under
  1610.                AmigaDos,  the  HOME  variable can be changed  very
  1611.                easily with:
  1612.  
  1613.                   HOME=.
  1614.  
  1615.                That is, you do not have  to  worry  about  certain
  1616.                files  being in the  HOME  directory as you do in a
  1617.                multi-user operating system such as UNIX.
  1618.  
  1619.      Example:  cd -p        # go back to old directory
  1620.  
  1621.      See Also: PWD, pwd, OLDDIR
  1622.  
  1623.        _________________________________________________________________
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.        SKsh Amiga Shell            Page 25             Reference Manual
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.  
  1657.        _________________________________________________________________
  1658.  
  1659.      Name:     CDPATH
  1660.  
  1661.      Type:     Variable
  1662.  
  1663.      Default:  Unset
  1664.  
  1665.      Usage:    $CDPATH
  1666.  
  1667.      Range:    n/a
  1668.  
  1669.      About:    If  CDPATH is set to a list of comma separated list
  1670.                of  directory  names,  the  cd command will  search
  1671.                those directories  after  $PWD  if  passed  a  non-
  1672.                qualified  directory  name  (one   not   containing
  1673.                slashes  or  colons).   The  CDPATH variable should
  1674.                not be set directly, but  rather,  be  set  through
  1675.                the -cd option to the path command.
  1676.  
  1677.      Example:  path -cd -add sys:usr
  1678.                cd ram:
  1679.                cd src     # cd's to sys:usr/src if it exists and
  1680.                           # there is no "src" directory in ram:
  1681.  
  1682.      See Also: cd, path
  1683.  
  1684.        _________________________________________________________________
  1685.  
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.        SKsh Amiga Shell            Page 26             Reference Manual
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.        _________________________________________________________________
  1724.  
  1725.      Name:     cdr
  1726.  
  1727.      Type:     Builtin
  1728.  
  1729.      Default:  n/a
  1730.  
  1731.      Usage:    cdr string [ sep_char ]
  1732.  
  1733.      Range:    n/a
  1734.  
  1735.      About:    cdr  provides a lisp-like cdr function which can be
  1736.                used   to   extract  items  from  lists  stored  in
  1737.                strings.    cdr  examines the string, and  extracts
  1738.                the  remainder of the list after removing the first
  1739.                item  separated by sep_char, which is by  default a
  1740.                space.  If  given  a  second argument, that is used
  1741.                in as sep_char in place of a space.
  1742.  
  1743.      Example:  mystring='item1,item2,item3,item4,item5,item6'
  1744.                rest_of_string=$(cdr "$mystring" ',')
  1745.  
  1746.      See Also: cdr
  1747.  
  1748.        _________________________________________________________________
  1749.  
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.        SKsh Amiga Shell            Page 27             Reference Manual
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.        _________________________________________________________________
  1790.  
  1791.      Name:     chext
  1792.  
  1793.      Type:     Script
  1794.  
  1795.      Default:  n/a
  1796.  
  1797.      Usage:    chext newext files..
  1798.  
  1799.      Range:    n/a
  1800.  
  1801.      About:    chext changes the extensions on files  by  removing
  1802.                any old extension present  and  appending  the  new
  1803.                one.  The new extension may either be  prefixed  by
  1804.                a dot or not.  In either case,  chext will separate
  1805.                the old name and the  new  extension  by  only  one
  1806.                dot.
  1807.  
  1808.      Example:  touch a.foo bb.foo ccc.foo d.foo
  1809.                chext .bar *.foo
  1810.  
  1811.      See Also:
  1812.  
  1813.        _________________________________________________________________
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.  
  1830.  
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.        SKsh Amiga Shell            Page 28             Reference Manual
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.        _________________________________________________________________
  1856.  
  1857.      Name:     chmod
  1858.  
  1859.      Type:     Builtin
  1860.  
  1861.      Default:  n/a
  1862.  
  1863.      Usage:    chmod flags | +flags | -flags   [ file ... ]
  1864.  
  1865.      Range:    flags : "hsparewd"
  1866.  
  1867.      About:    chmod  changes  the  file  protection bits  on  the
  1868.                named files.  Flags can be one or more of the  fol-
  1869.                lowing  letters:  "hsparewd".  If the flags  param-
  1870.                eter is given  directly with no leading '+' or '-',
  1871.                the  permissions for all the named files are set to
  1872.                that  value.   A   leading '+' causes the indicated
  1873.                permissions bits  to  be  set  without changing the
  1874.                others, and a  leading '-' causes them to be reset.
  1875.                In  addition, a 'x' may be used in place of the 'e'
  1876.                flag.
  1877.  
  1878.      Example:  chmod -a *.c   # reset archive bit on all .c files
  1879.  
  1880.      See Also: ls
  1881.  
  1882.        _________________________________________________________________
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.        SKsh Amiga Shell            Page 29             Reference Manual
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.        _________________________________________________________________
  1922.  
  1923.      Name:     cilist
  1924.  
  1925.      Type:     Builtin
  1926.  
  1927.      Default:  -l option
  1928.  
  1929.      Usage:    cilist [ -adrel ] [ patterns ... ]
  1930.  
  1931.      Range:    n/a
  1932.  
  1933.      About:    The  cilist (completion-ignore  list)  command pro-
  1934.                vides  a  method   to   enhance  the  command  line
  1935.                filename  completion mechanism.  It only  functions
  1936.                if  SKsh  command  line  editing is  enabled.   The
  1937.                cilist is used  to  store  patterns which should be
  1938.                ignored  during file completion.   For  example, if
  1939.                it  contained  the  patterns "*.info", "*.bak", and
  1940.                "ZZ*",  file  completion  would  effectively ignore
  1941.                files  matching any of those patterns.  This can be
  1942.                useful if  there  are  certain types of files which
  1943.                you wish to ignore during completion.
  1944.  
  1945.                -a   Add  the  supplied  arguments to  the  cilist.
  1946.                     The  old  contents of the  list  are  left  in
  1947.                     place.
  1948.  
  1949.                -d   Delete   the   supplied   arguments  from  the
  1950.                     cilist.
  1951.  
  1952.                -r   Synonym for -d.
  1953.  
  1954.                -e   Empty the cilist.
  1955.  
  1956.                -l   List the  contents of the cilist, one name per
  1957.                     line.  If no  command line switches are given,
  1958.                     this is the default.
  1959.  
  1960.      Hints:    Please note the following:
  1961.  
  1962.                *    The  patterns added to the  cilist must be es-
  1963.                     caped or quoted to avoid  being interpreted as
  1964.                     wildcards by  the  shell.   Alternatively, the
  1965.                     cilist  command itself can be added to the dw-
  1966.                     clist (see that command for details).
  1967.  
  1968.                *    The  cilist  will  remove all entries matching
  1969.                     any of the given patterns.  This  includes en-
  1970.                     tries from the complist.
  1971.  
  1972.                *    The  cilist can be null if you don't  wish  to
  1973.                     use this feature.
  1974.  
  1975.  
  1976.  
  1977.        SKsh Amiga Shell            Page 30             Reference Manual
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.  
  1988.      Example:  cilist -e     # empty the cilist
  1989.                # now add these names...
  1990.                cilist -a '*.info' '*.bak' '*~' '*.o'
  1991.  
  1992.      See Also: complist
  1993.  
  1994.        _________________________________________________________________
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.  
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.        SKsh Amiga Shell            Page 31             Reference Manual
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.        _________________________________________________________________
  2054.  
  2055.      Name:     clear, cls
  2056.  
  2057.      Type:     Alias
  2058.  
  2059.      Default:  echo -n $_ANSI_CLEAR
  2060.  
  2061.      Usage:    clear
  2062.  
  2063.      Range:    n/a
  2064.  
  2065.      About:    These aliases both  clear  the  screen  by  echoing
  2066.                $_ANSI_CLEAR.
  2067.  
  2068.      Example:  clear
  2069.  
  2070.      See Also: _ANSI_CLEAR
  2071.  
  2072.        _________________________________________________________________
  2073.  
  2074.  
  2075.  
  2076.  
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.        SKsh Amiga Shell            Page 32             Reference Manual
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.        _________________________________________________________________
  2120.  
  2121.      Name:     cleard
  2122.  
  2123.      Type:     Script
  2124.  
  2125.      Default:  n/a
  2126.  
  2127.      Usage:    cleard
  2128.  
  2129.      Range:    n/a
  2130.  
  2131.      About:    The  cleard script clears the directory stack.  The
  2132.                DIRSTACK  variable should never  be  changed  manu-
  2133.                ally,  but  rather,  always through these directory
  2134.                stack functions.
  2135.  
  2136.      Example:  pushd sys:utilities    # push directory
  2137.                cleard                 # clear dir stack
  2138.  
  2139.      See Also: pushd, popd, dstack, DIRSTACK
  2140.  
  2141.        _________________________________________________________________
  2142.  
  2143.  
  2144.  
  2145.  
  2146.  
  2147.  
  2148.  
  2149.  
  2150.  
  2151.  
  2152.  
  2153.  
  2154.  
  2155.  
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.        SKsh Amiga Shell            Page 33             Reference Manual
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.        _________________________________________________________________
  2186.  
  2187.      Name:     CLINUM
  2188.  
  2189.      Type:     Variable
  2190.  
  2191.      Default:  n/a
  2192.  
  2193.      Usage:    $CLINUM
  2194.  
  2195.      Range:    1 to maximum process number limit
  2196.  
  2197.      About:    This  variable is set to the CLI  process number of
  2198.                SKsh when it is started.
  2199.  
  2200.      Example:  echo "Process # = $CLINUM"
  2201.  
  2202.      See Also:
  2203.  
  2204.        _________________________________________________________________
  2205.  
  2206.  
  2207.  
  2208.  
  2209.  
  2210.  
  2211.  
  2212.  
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.        SKsh Amiga Shell            Page 34             Reference Manual
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.        _________________________________________________________________
  2252.  
  2253.      Name:     CMDNUM
  2254.  
  2255.      Type:     Variable
  2256.  
  2257.      Default:  n/a
  2258.  
  2259.      Usage:    $CMDNUM
  2260.  
  2261.      Range:    1 to 16 million
  2262.  
  2263.      About:    Each  time  SKsh  inputs a line from the  keyboard,
  2264.                this variable is incremented.
  2265.  
  2266.      Example:  echo "$CMDNUM lines have been entered so far."
  2267.  
  2268.      See Also: history
  2269.  
  2270.        _________________________________________________________________
  2271.  
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.        SKsh Amiga Shell            Page 35             Reference Manual
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.  
  2317.        _________________________________________________________________
  2318.  
  2319.      Name:     COLUMNS
  2320.  
  2321.      Type:     Variable
  2322.  
  2323.      Default:  72
  2324.  
  2325.      Usage:    $COLUMNS
  2326.  
  2327.      Range:    15 to 130
  2328.  
  2329.      About:    This  variable is  one  of  several responsible for
  2330.                controlling  the  actions of SKsh line  editing and
  2331.                display output.   If  line  editing is enabled, and
  2332.                the  cursor  moves  beyond the  column indicated by
  2333.                this  variable, SKsh slides the line to the left by
  2334.                12 characters.  SKsh  also  uses  this  variable to
  2335.                truncate  the  output of certain internal SKsh com-
  2336.                mands  (such  as  History).  This creates a cleaner
  2337.                display.
  2338.  
  2339.                This  variable  is  normally  set  automatically by
  2340.                SKsh when the  window is resized, although this be-
  2341.                havior can be disabled with the options command.
  2342.  
  2343.      Example:  COLUMNS=78
  2344.  
  2345.      See Also: PNPC, LINES, options
  2346.  
  2347.        _________________________________________________________________
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.        SKsh Amiga Shell            Page 36             Reference Manual
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.  
  2383.        _________________________________________________________________
  2384.  
  2385.      Name:     complist
  2386.  
  2387.      Type:     Builtin
  2388.  
  2389.      Default:  -l option
  2390.  
  2391.      Usage:    complist [ -adrel ] [ names ... ]
  2392.  
  2393.      Range:    n/a
  2394.  
  2395.      About:    The  complist  command  provides a method to extend
  2396.                the  command  line  filename  completion mechanism.
  2397.                It  only  functions if SKsh command line editing is
  2398.                enabled.   SKsh   maintains an  internal completion
  2399.                list  of  user  defined  strings.   When  <tab>  or
  2400.                <esc><esc> are used  to  complete a string, the in-
  2401.                ternal  completion list is consulted before comple-
  2402.                tion  is  attempted on files.  If a match is  found
  2403.                in the  internal completion list (even if it is but
  2404.                a  partial  match),  it  is  used.   If  not,  then
  2405.                filename  completion proceeds as normal.  An option
  2406.                is  provided to turn on or off this  behaviour (see
  2407.                the options command for details).
  2408.  
  2409.                -a   Add  the  supplied arguments to the completion
  2410.                     list.  The  old  contents of the list are left
  2411.                     in place.
  2412.  
  2413.                -d   Delete   the   supplied   arguments  from  the
  2414.                     completion list.
  2415.  
  2416.                -r   Synonym for -d.
  2417.  
  2418.                -e   Empty the completion list.
  2419.  
  2420.                -l   List the  contents of the completion list, one
  2421.                     name per line.   If  no  command line switches
  2422.                     are given, this is the default.
  2423.  
  2424.      Hints:    The  completion list can, among  other  things,  be
  2425.                used to:
  2426.  
  2427.                *    Maintain  a  user  defined list of strings  to
  2428.                     contain, for  example, device or program names
  2429.                     (such  as  "graphics:" or  "calculator") which
  2430.                     are commonly typed.
  2431.  
  2432.                *    Contain  programs names which are found in the
  2433.                     search path.
  2434.  
  2435.                *    Buffer  the  contents of the current directory
  2436.                     so  that  subsequent successful completions do
  2437.  
  2438.  
  2439.        SKsh Amiga Shell            Page 37             Reference Manual
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.                     not have to read the  directory.   This  makes
  2450.                     filename  completion  usable on a floppy based
  2451.                     system or on a  hard  disk  when  a  directory
  2452.                     contains  a  large  number of files.  A  shell
  2453.                     function  is  supplied in the Stuff.sksh  file
  2454.                     which adds the files in the  current directory
  2455.                     to the completion list.
  2456.  
  2457.                *    Perform  completion on files stored  inside of
  2458.                     a  zoo  archive.   A  function supplied in the
  2459.                     Stuff.sksh file  facilitates this process.  It
  2460.                     could also, with a little  work,  be  extended
  2461.                     to handle other archive types.
  2462.  
  2463.      Example:  complist -e     # empty the completion list
  2464.                # now add these names...
  2465.                complist -a graphics: my_program foo
  2466.  
  2467.      See Also: zget, cget (from Stuff.sksh)
  2468.                options (+C)
  2469.  
  2470.        _________________________________________________________________
  2471.  
  2472.  
  2473.  
  2474.  
  2475.  
  2476.  
  2477.  
  2478.  
  2479.  
  2480.  
  2481.  
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.        SKsh Amiga Shell            Page 38             Reference Manual
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.        _________________________________________________________________
  2516.  
  2517.      Name:     continue
  2518.  
  2519.      Type:     Builtin
  2520.  
  2521.      Default:  n/a
  2522.  
  2523.      Usage:    continue [ num ]
  2524.  
  2525.      Range:    n/a
  2526.  
  2527.      About:    continue  resumes execution with the next iteration
  2528.                of the  surrounding loop, or the nth subsequent it-
  2529.                eration if given a numeric argument.
  2530.  
  2531.      Example:  for a in a b c d e f
  2532.                do
  2533.                   echo $a
  2534.                   if [ "$a" = "c" ] then continue; fi
  2535.                   echo "This is not echoed when \$a = c"
  2536.                done
  2537.  
  2538.      See Also: break
  2539.  
  2540.        _________________________________________________________________
  2541.  
  2542.  
  2543.  
  2544.  
  2545.  
  2546.  
  2547.  
  2548.  
  2549.  
  2550.  
  2551.  
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.        SKsh Amiga Shell            Page 39             Reference Manual
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.        _________________________________________________________________
  2582.  
  2583.      Name:     ctpri
  2584.  
  2585.      Type:     Alias
  2586.  
  2587.      Default:  ChangeTaskPri
  2588.  
  2589.      Usage:    ctpri
  2590.                ctpri num
  2591.  
  2592.      Range:    -31 <= num <= 31
  2593.  
  2594.      About:    This  alias  is  provided as a shorter  alternative to
  2595.                the  AmigaDos  ChangeTaskpri  command.   Its  use   is
  2596.                identical.
  2597.  
  2598.      Example:  ctpri 1
  2599.  
  2600.      See Also: stack
  2601.  
  2602.        _________________________________________________________________
  2603.  
  2604.  
  2605.  
  2606.  
  2607.  
  2608.  
  2609.  
  2610.  
  2611.  
  2612.  
  2613.  
  2614.  
  2615.  
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.        SKsh Amiga Shell            Page 40             Reference Manual
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.        _________________________________________________________________
  2648.  
  2649.      Name:     date
  2650.  
  2651.      Type:     Builtin
  2652.  
  2653.      Default:  n/a
  2654.  
  2655.      Usage:    date [-aDmdty]
  2656.  
  2657.      Range:    n/a
  2658.  
  2659.      About:    Date  prints  the  current  date  as  a  24  character
  2660.                string:
  2661.  
  2662.                   DDD mmm dd hh:mm:ss yyyy
  2663.  
  2664.                Date  with  the  -a (all)  option is identical to date
  2665.                with no  parameters, (which prints the date as above).
  2666.                Date  -D prints  a  three  character representation of
  2667.                the day of the  week.   Date -m prints a three charac-
  2668.                ter  representation of the month.   Date -d prints the
  2669.                day  number as  two  digits.   Date -t prints the time
  2670.                string, and date -y prints the year as four digits.
  2671.  
  2672.      Example:  date -y    # find the year
  2673.  
  2674.      See Also: time
  2675.  
  2676.        _________________________________________________________________
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.        SKsh Amiga Shell            Page 41             Reference Manual
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.        _________________________________________________________________
  2714.  
  2715.      Name:     dec
  2716.  
  2717.      Type:     Builtin
  2718.  
  2719.      Default:  n/a
  2720.  
  2721.      Usage:    dec var [ count ]
  2722.  
  2723.      Range:    n/a
  2724.  
  2725.      About:    dec  decrements  the  contents of  the  variable by
  2726.                count, or 1 if count is not given.  It  is  equiva-
  2727.                lent  to,  but  faster  than,  'var=$(expr  $var  -
  2728.                $count)'
  2729.  
  2730.      Example:  dec my_var 3
  2731.  
  2732.      See Also: inc
  2733.  
  2734.        _________________________________________________________________
  2735.  
  2736.  
  2737.  
  2738.  
  2739.  
  2740.  
  2741.  
  2742.  
  2743.  
  2744.  
  2745.  
  2746.  
  2747.  
  2748.  
  2749.  
  2750.  
  2751.  
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.        SKsh Amiga Shell            Page 42             Reference Manual
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.  
  2777.  
  2778.  
  2779.        _________________________________________________________________
  2780.  
  2781.      Name:     dir
  2782.  
  2783.      Type:     Alias
  2784.  
  2785.      Default:  ls -bF
  2786.  
  2787.      Usage:    dir [ file | dir ] ...
  2788.  
  2789.      Range:    n/a
  2790.  
  2791.      About:    dir prints a  short  format directory listing, with
  2792.                only the basename of each file printed.  Note  that
  2793.                the 'F' option to 'ls' is set.
  2794.  
  2795.      Example:  dir s:
  2796.  
  2797.      See Also: ls, ll
  2798.  
  2799.        _________________________________________________________________
  2800.  
  2801.  
  2802.  
  2803.  
  2804.  
  2805.  
  2806.  
  2807.  
  2808.  
  2809.  
  2810.  
  2811.  
  2812.  
  2813.  
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.        SKsh Amiga Shell            Page 43             Reference Manual
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843.  
  2844.  
  2845.        _________________________________________________________________
  2846.  
  2847.      Name:     dirname
  2848.  
  2849.      Type:     Builtin
  2850.  
  2851.      Default:  n/a
  2852.  
  2853.      Usage:    dirname [ files ... ]
  2854.  
  2855.      Range:    n/a
  2856.  
  2857.      About:    dirname  prints  the  "directory" name of  a  given
  2858.                path.  For  example, the dirname of sys:System/For-
  2859.                mat  is  simply  sys:System.  If  dirname is passed
  2860.                more than  one  parameter, it prints the dirname of
  2861.                each parameter in turn.
  2862.  
  2863.      Example:  dirname sys:usr/bin/wc
  2864.  
  2865.      See Also: basename, extname
  2866.  
  2867.        _________________________________________________________________
  2868.  
  2869.  
  2870.  
  2871.  
  2872.  
  2873.  
  2874.  
  2875.  
  2876.  
  2877.  
  2878.  
  2879.  
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.  
  2901.        SKsh Amiga Shell            Page 44             Reference Manual
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909.  
  2910.  
  2911.        _________________________________________________________________
  2912.  
  2913.      Name:     DIRSTACK
  2914.  
  2915.      Type:     Variable
  2916.  
  2917.      Default:  Unset
  2918.  
  2919.      Usage:    $DIRSTACK
  2920.  
  2921.      Range:    n/a
  2922.  
  2923.      About:    This  variable is used to store the directory stack
  2924.                as used by  the  pushd and popd scripts.  It should
  2925.                not  be  set   manually,  but  rather  be  modified
  2926.                through  the  directory stack scripts.  The  dstack
  2927.                function can  be  used  to  examine the contents of
  2928.                the variable, and cleard will clear it.
  2929.  
  2930.      Example:
  2931.  
  2932.      See Also: pushd, popd, cleard, dstack
  2933.  
  2934.        _________________________________________________________________
  2935.  
  2936.  
  2937.  
  2938.  
  2939.  
  2940.  
  2941.  
  2942.  
  2943.  
  2944.  
  2945.  
  2946.  
  2947.  
  2948.  
  2949.  
  2950.  
  2951.  
  2952.  
  2953.  
  2954.  
  2955.  
  2956.  
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965.  
  2966.  
  2967.        SKsh Amiga Shell            Page 45             Reference Manual
  2968.  
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974.  
  2975.  
  2976.  
  2977.        _________________________________________________________________
  2978.  
  2979.      Name:     dstack
  2980.  
  2981.      Type:     Script
  2982.  
  2983.      Default:  n/a
  2984.  
  2985.      Usage:    dstack
  2986.  
  2987.      Range:    n/a
  2988.  
  2989.      About:    The  dstack script lists  the  directory stack, one
  2990.                directory per line.  The  directories listed on the
  2991.                top of the stack will  be  popped  first  when  the
  2992.                popd script is used.
  2993.  
  2994.      Example:  pushd sys:utilities    # push directory
  2995.                dstack                 # list dir stack
  2996.  
  2997.      See Also: pushd, popd, cleard, DIRSTACK
  2998.  
  2999.        _________________________________________________________________
  3000.  
  3001.  
  3002.  
  3003.  
  3004.  
  3005.  
  3006.  
  3007.  
  3008.  
  3009.  
  3010.  
  3011.  
  3012.  
  3013.  
  3014.  
  3015.  
  3016.  
  3017.  
  3018.  
  3019.  
  3020.  
  3021.  
  3022.  
  3023.  
  3024.  
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.        SKsh Amiga Shell            Page 46             Reference Manual
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041.  
  3042.  
  3043.        _________________________________________________________________
  3044.  
  3045.      Name:     dwclist
  3046.  
  3047.      Type:     Builtin
  3048.  
  3049.      Default:  -l option
  3050.  
  3051.      Usage:    dwclist [ -adrel ] [ names ... ]
  3052.  
  3053.      Range:    n/a
  3054.  
  3055.      About:    The  dwclist  (disabled wildcard list) command pro-
  3056.                vides  the  ability so selectively disable wildcard
  3057.                expansion for  individual commands.  When expanding
  3058.                wildcards, SKsh first checks  the  command name for
  3059.                inclusion in the  dwclist.  If found, SKsh will not
  3060.                expand  parameters  which  contain  wildcards,  but
  3061.                rather, will pass these wildcards  to  the  command
  3062.                directly.
  3063.  
  3064.                The  dwclist is  very  useful for external programs
  3065.                which  perform their own  wildcard  expansion.   By
  3066.                putting  the  command in the dwclist, SKsh will let
  3067.                that  command  perform its own wildcard  expansion,
  3068.                thus  circumventing the 255  character command line
  3069.                limit in AmigaDos 1.3.
  3070.  
  3071.                An  option  is  provided to turn on or off this be-
  3072.                haviour  (see  the  options  command for  details).
  3073.                The default is to ignore the dwclist.
  3074.  
  3075.                The  following  arguments, similar to those for the
  3076.                complist command, are accepted:
  3077.  
  3078.                -a   Add  the  supplied  arguments to the  dwclist.
  3079.                     The  old  contents of the  list  are  left  in
  3080.                     place.
  3081.  
  3082.                -d   Delete   the   supplied   arguments  from  the
  3083.                     dwclist.
  3084.  
  3085.                -r   Same as -d.
  3086.  
  3087.                -e   Empty the dwclist.
  3088.  
  3089.                -l   List  the  contents of  the  dwclist list, one
  3090.                     name per line.   If  no  command line switches
  3091.                     are given, this is the default.
  3092.  
  3093.      Hints:    The following should be noted:
  3094.  
  3095.                *    The +w  option is not set by default.  It must
  3096.                     be set explicitly to use the dwclist feature.
  3097.  
  3098.  
  3099.        SKsh Amiga Shell            Page 47             Reference Manual
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.  
  3110.                *    Use of long a  long  dwclist will slightly de-
  3111.                     grade  the  SKsh  interpreter performance, al-
  3112.                     though  commands in the  list  will  run  much
  3113.                     faster if passed parameters with wildcards.
  3114.  
  3115.                *    SKsh searches for the first  argument verbatim
  3116.                     in  the  dwclist.  This means  that,  for  ex-
  3117.                     ample,  if  a  program is added to the list as
  3118.                     "myprog",  it  must  be  invoked in  the  same
  3119.                     manner.   Supplying a path name will not work,
  3120.                     unless  the  entire path is also added to  the
  3121.                     list.
  3122.  
  3123.                *    SKsh  does  not  care  whether  entries in the
  3124.                     list are  external programs or internal built-
  3125.                     ins, functions, or aliases.
  3126.  
  3127.                *    If an alias  or  a  function is used to invoke
  3128.                     an  external  command, both the alias or func-
  3129.                     tion name and  the  external command name must
  3130.                     appear in  the  dwclist.  Otherwise, SKsh will
  3131.                     attempt  to  expand the wildcards for the  one
  3132.                     not listed.
  3133.  
  3134.      Example:  dwclist -e     # empty the dwclist
  3135.                # now add these names...
  3136.                dwclist -a zoo lharc
  3137.  
  3138.      See Also: options (+w)
  3139.  
  3140.        _________________________________________________________________
  3141.  
  3142.  
  3143.  
  3144.  
  3145.  
  3146.  
  3147.  
  3148.  
  3149.  
  3150.  
  3151.  
  3152.  
  3153.  
  3154.  
  3155.  
  3156.  
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.  
  3163.  
  3164.  
  3165.        SKsh Amiga Shell            Page 48             Reference Manual
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.  
  3173.  
  3174.  
  3175.        _________________________________________________________________
  3176.  
  3177.      Name:     echo
  3178.  
  3179.      Type:     Builtin
  3180.  
  3181.      Default:  n/a
  3182.  
  3183.      Usage:    echo [-nc] [ parameter ... ]
  3184.  
  3185.      Range:    n/a
  3186.  
  3187.      About:    The  echo command simply prints its arguments to stan-
  3188.                dard  output.   If  given  no   arguments, it prints a
  3189.                newline.    Otherwise, it prints its  arguments, sepa-
  3190.                rated by a single space,  unless the -c option is set,
  3191.                in which case  no  separating spaces are printed (con-
  3192.                catenation  mode).   Echo   normally prints a trailing
  3193.                newline,  unless  the  -n option is set, in which case
  3194.                no trailing newline is printed.
  3195.  
  3196.                'echo -c' is useful for concatenating strings:
  3197.  
  3198.                   result = $(echo -c This '+' That)
  3199.  
  3200.      Example:  echo 'These' 'arguments' are "echoed"
  3201.  
  3202.      See Also:
  3203.  
  3204.        _________________________________________________________________
  3205.  
  3206.  
  3207.  
  3208.  
  3209.  
  3210.  
  3211.  
  3212.  
  3213.  
  3214.  
  3215.  
  3216.  
  3217.  
  3218.  
  3219.  
  3220.  
  3221.  
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.        SKsh Amiga Shell            Page 49             Reference Manual
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241.        _________________________________________________________________
  3242.  
  3243.      Name:     emacs_mode
  3244.  
  3245.      Type:     Script
  3246.  
  3247.      Default:  n/a
  3248.  
  3249.      Usage:    emacs_mode
  3250.  
  3251.      Range:    n/a
  3252.  
  3253.      About:    emacs_mode  executes a series of setmap commands to
  3254.                implement an emacs-like  command line editing mode.
  3255.                This  editing  mode  is  described in detail in the
  3256.                UserMan.doc  file.   This  does  not   operate with
  3257.                Tiny_SKsh.
  3258.  
  3259.      Example:  emacs_mode  # set emacs command line editing.
  3260.  
  3261.      See Also: vi_mode, setmap
  3262.  
  3263.        _________________________________________________________________
  3264.  
  3265.  
  3266.  
  3267.  
  3268.  
  3269.  
  3270.  
  3271.  
  3272.  
  3273.  
  3274.  
  3275.  
  3276.  
  3277.  
  3278.  
  3279.  
  3280.  
  3281.  
  3282.  
  3283.  
  3284.  
  3285.  
  3286.  
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297.        SKsh Amiga Shell            Page 50             Reference Manual
  3298.  
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.  
  3305.  
  3306.  
  3307.        _________________________________________________________________
  3308.  
  3309.      Name:     eval
  3310.  
  3311.      Type:     Builtin
  3312.  
  3313.      Default:  n/a
  3314.  
  3315.      Usage:    eval [ string ... ]
  3316.  
  3317.      Range:    n/a
  3318.  
  3319.      About:    eval executes the text of the supplied  strings  as
  3320.                if they were  SKsh  commands.   If  more  than  one
  3321.                string is given, they are evaluated in order.
  3322.  
  3323.      Example:  foo='for a in a b c; do; echo $a; done'
  3324.                eval "$foo" 'echo boo'
  3325.  
  3326.      See Also:
  3327.  
  3328.        _________________________________________________________________
  3329.  
  3330.  
  3331.  
  3332.  
  3333.  
  3334.  
  3335.  
  3336.  
  3337.  
  3338.  
  3339.  
  3340.  
  3341.  
  3342.  
  3343.  
  3344.  
  3345.  
  3346.  
  3347.  
  3348.  
  3349.  
  3350.  
  3351.  
  3352.  
  3353.  
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362.  
  3363.        SKsh Amiga Shell            Page 51             Reference Manual
  3364.  
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370.  
  3371.  
  3372.  
  3373.        _________________________________________________________________
  3374.  
  3375.      Name:     exit
  3376.  
  3377.      Type:     Builtin
  3378.  
  3379.      Default:  n/a
  3380.  
  3381.      Usage:    exit [ code ]
  3382.  
  3383.      Range:    n/a
  3384.  
  3385.      About:    exit leaves  SKsh,  returning execution back to the
  3386.                invoking  shell.   If  invoked with a numeric argu-
  3387.                ment,  it  returns that exit code to  the  invoking
  3388.                shell or program.
  3389.  
  3390.                Note  that  exit  always  exits SKsh entirely.   To
  3391.                simply exit a  script  or  function, use the return
  3392.                statement.   If  the   LOGOUT  variable is defined,
  3393.                exit will execute that string before terminating.
  3394.  
  3395.      Example:  exit    # exits successfully
  3396.  
  3397.      See Also: return, LOGOUT
  3398.  
  3399.        _________________________________________________________________
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.  
  3422.  
  3423.  
  3424.  
  3425.  
  3426.  
  3427.  
  3428.  
  3429.        SKsh Amiga Shell            Page 52             Reference Manual
  3430.  
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436.  
  3437.  
  3438.  
  3439.        _________________________________________________________________
  3440.  
  3441.      Name:     export
  3442.  
  3443.      Type:     Builtin
  3444.  
  3445.      Default:  n/a
  3446.  
  3447.      Usage:    export [ -l ] [ var ... ]
  3448.  
  3449.      Range:    n/a
  3450.  
  3451.      About:    export  (without  the  -l  option) does two things.
  3452.                It sets the  value  of  the  indicated variables in
  3453.                the  topmost  symbol table in SKsh, and it sets  an
  3454.                AmigaDos  environment  variable with the same  name
  3455.                and value.  This is the only way to  transfer vari-
  3456.                able values between executions of SKsh.
  3457.  
  3458.                export  with  the  -l  option only sets the topmost
  3459.                symbol table of SKsh, but not  the  AmigaDos  envi-
  3460.                ronment variable.  This  is  faster  and  does  not
  3461.                clutter up  the  environment with unneeded variable
  3462.                definitions.
  3463.  
  3464.      Example:  export -l my_var1 my_var2
  3465.  
  3466.      See Also: getenv
  3467.  
  3468.        _________________________________________________________________
  3469.  
  3470.  
  3471.  
  3472.  
  3473.  
  3474.  
  3475.  
  3476.  
  3477.  
  3478.  
  3479.  
  3480.  
  3481.  
  3482.  
  3483.  
  3484.  
  3485.  
  3486.  
  3487.  
  3488.  
  3489.  
  3490.  
  3491.  
  3492.  
  3493.  
  3494.  
  3495.        SKsh Amiga Shell            Page 53             Reference Manual
  3496.  
  3497.  
  3498.  
  3499.  
  3500.  
  3501.  
  3502.  
  3503.  
  3504.  
  3505.        _________________________________________________________________
  3506.  
  3507.      Name:     expr
  3508.  
  3509.      Type:     Keyword
  3510.  
  3511.      Default:  n/a
  3512.  
  3513.      Usage:    expr length string
  3514.                expr num_expression
  3515.                expr index str pattern
  3516.                expr substr num1 num2
  3517.  
  3518.      Range:    n/a
  3519.  
  3520.      About:    expr   evaluates  and  prints  the  results  of  an
  3521.                expression.
  3522.  
  3523.                expr length string
  3524.  
  3525.                   prints the length in characters of the string
  3526.  
  3527.                expr num_expression
  3528.  
  3529.                   prints the  result of evaluating num_expression.
  3530.                   num_expression  is  an  integer  expression com-
  3531.                   puted with 32  bit  integers.   '+',  '-',  '*',
  3532.                   '/', and '%' can be used.   '*',  '/',  and  '%'
  3533.                   have a higher  precedence than '+' and '-'; oth-
  3534.                   erwise,  the  expression  is  evaluated left  to
  3535.                   right.  Parentheses can be used.
  3536.  
  3537.                expr index str pattern
  3538.  
  3539.                   prints  the  index  of  pattern if found in  the
  3540.                   string, or 0 if not found.  The  first  position
  3541.                   in string is 1, not 0.   Unlike ksh, pattern can
  3542.                   be more than one character.
  3543.  
  3544.                expr substr string num1 num2
  3545.  
  3546.                   prints the substring of the  string  starting at
  3547.                   the  position  indicated by num1  and  extending
  3548.                   for  num2  characters.   The   beginning of  the
  3549.                   string is at position one, not 0.
  3550.  
  3551.      Example:  expr 3 * ( 1 + 4 )
  3552.                expr length "foo"
  3553.                expr index 'foobarnot' 'bar'
  3554.                expr substr 'foobarnot' 4 3
  3555.  
  3556.      See Also:
  3557.  
  3558.        _________________________________________________________________
  3559.  
  3560.  
  3561.        SKsh Amiga Shell            Page 54             Reference Manual
  3562.  
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568.  
  3569.  
  3570.  
  3571.        _________________________________________________________________
  3572.  
  3573.      Name:     extname
  3574.  
  3575.      Type:     Builtin
  3576.  
  3577.      Default:  n/a
  3578.  
  3579.      Usage:    extname [ -v ] [ fspec ]
  3580.  
  3581.      Range:    n/a
  3582.  
  3583.      About:    extname prints the  "extension"  of  a  given  path
  3584.                name.  For example, the extension of  my_file.c  is
  3585.                simply 'c'.
  3586.  
  3587.                When used with the "-v"  flag,  extname prints that
  3588.                part  of  the  file  name  which  is  not  in   the
  3589.                extension.
  3590.  
  3591.      Example:  extname my_file.c
  3592.  
  3593.      See Also: basename, dirname
  3594.  
  3595.        _________________________________________________________________
  3596.  
  3597.  
  3598.  
  3599.  
  3600.  
  3601.  
  3602.  
  3603.  
  3604.  
  3605.  
  3606.  
  3607.  
  3608.  
  3609.  
  3610.  
  3611.  
  3612.  
  3613.  
  3614.  
  3615.  
  3616.  
  3617.  
  3618.  
  3619.  
  3620.  
  3621.  
  3622.  
  3623.  
  3624.  
  3625.  
  3626.  
  3627.        SKsh Amiga Shell            Page 55             Reference Manual
  3628.  
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.  
  3635.  
  3636.  
  3637.        _________________________________________________________________
  3638.  
  3639.      Name:     false
  3640.  
  3641.      Type:     Builtin
  3642.  
  3643.      Default:  n/a
  3644.  
  3645.      Usage:    false
  3646.  
  3647.      Range:    n/a
  3648.  
  3649.      About:    false  simply  returns a false exit code, and  does
  3650.                nothing else.
  3651.  
  3652.      Example:  if false
  3653.                then
  3654.                   echo 'This will never echo'
  3655.                fi
  3656.  
  3657.      See Also: true
  3658.  
  3659.        _________________________________________________________________
  3660.  
  3661.  
  3662.  
  3663.  
  3664.  
  3665.  
  3666.  
  3667.  
  3668.  
  3669.  
  3670.  
  3671.  
  3672.  
  3673.  
  3674.  
  3675.  
  3676.  
  3677.  
  3678.  
  3679.  
  3680.  
  3681.  
  3682.  
  3683.  
  3684.  
  3685.  
  3686.  
  3687.  
  3688.  
  3689.  
  3690.  
  3691.  
  3692.  
  3693.        SKsh Amiga Shell            Page 56             Reference Manual
  3694.  
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.  
  3701.  
  3702.  
  3703.        _________________________________________________________________
  3704.  
  3705.      Name:     for/do/done
  3706.  
  3707.      Type:     Keywords
  3708.  
  3709.      Default:  n/a
  3710.  
  3711.      Usage:    for var in list do stmt_list done
  3712.  
  3713.      Range:    n/a
  3714.  
  3715.      About:    The  variable is set to each value in list, and for
  3716.                each value, the statement list is executed.
  3717.  
  3718.      Example:  for file in *.h *.c
  3719.                do
  3720.                   cp $file $file.bak
  3721.                done
  3722.  
  3723.      See Also: while
  3724.  
  3725.        _________________________________________________________________
  3726.  
  3727.  
  3728.  
  3729.  
  3730.  
  3731.  
  3732.  
  3733.  
  3734.  
  3735.  
  3736.  
  3737.  
  3738.  
  3739.  
  3740.  
  3741.  
  3742.  
  3743.  
  3744.  
  3745.  
  3746.  
  3747.  
  3748.  
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.  
  3758.  
  3759.        SKsh Amiga Shell            Page 57             Reference Manual
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.  
  3767.  
  3768.  
  3769.        _________________________________________________________________
  3770.  
  3771.      Name:     force
  3772.  
  3773.      Type:     Keyword
  3774.  
  3775.      Default:  n/a
  3776.  
  3777.      Usage:    force [ -fba ] command [ parameter ... ]
  3778.  
  3779.      Range:    n/a
  3780.  
  3781.      About:    force forces SKsh  to  interpret command as a func-
  3782.                tion,  builtin, or alias.   Exactly one of the 'f',
  3783.                'b', and 'a' flags must be present.   force is use-
  3784.                ful if the builtin commands are redefined.
  3785.  
  3786.      Example:  function date {
  3787.                   echo -n 'The date is: '
  3788.                   force -b date
  3789.                }
  3790.  
  3791.      See Also:
  3792.  
  3793.        _________________________________________________________________
  3794.  
  3795.  
  3796.  
  3797.  
  3798.  
  3799.  
  3800.  
  3801.  
  3802.  
  3803.  
  3804.  
  3805.  
  3806.  
  3807.  
  3808.  
  3809.  
  3810.  
  3811.  
  3812.  
  3813.  
  3814.  
  3815.  
  3816.  
  3817.  
  3818.  
  3819.  
  3820.  
  3821.  
  3822.  
  3823.  
  3824.  
  3825.        SKsh Amiga Shell            Page 58             Reference Manual
  3826.  
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.  
  3833.  
  3834.  
  3835.        _________________________________________________________________
  3836.  
  3837.      Name:     function
  3838.  
  3839.      Type:     Keyword
  3840.  
  3841.      Default:  n/a
  3842.  
  3843.      Usage:    function name { stmt_list }
  3844.  
  3845.      Range:    n/a
  3846.  
  3847.      About:    function  defines an SKsh function called name, and
  3848.                with the definition given by the statement list.
  3849.  
  3850.      Example:  function my_func {
  3851.                   echo "I was passed $# parameters"
  3852.                }
  3853.  
  3854.      See Also: functions
  3855.  
  3856.        _________________________________________________________________
  3857.  
  3858.  
  3859.  
  3860.  
  3861.  
  3862.  
  3863.  
  3864.  
  3865.  
  3866.  
  3867.  
  3868.  
  3869.  
  3870.  
  3871.  
  3872.  
  3873.  
  3874.  
  3875.  
  3876.  
  3877.  
  3878.  
  3879.  
  3880.  
  3881.  
  3882.  
  3883.  
  3884.  
  3885.  
  3886.  
  3887.  
  3888.  
  3889.  
  3890.  
  3891.        SKsh Amiga Shell            Page 59             Reference Manual
  3892.  
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898.  
  3899.  
  3900.  
  3901.        _________________________________________________________________
  3902.  
  3903.      Name:     functions
  3904.  
  3905.      Type:     Alias
  3906.  
  3907.      Default:  set -f
  3908.  
  3909.      Usage:    functions [ pattern... ]
  3910.  
  3911.      Range:    n/a
  3912.  
  3913.      About:    This  alias  lists  defined functions.  The pattern
  3914.                uses  normal wildcards, but must be quoted to avoid
  3915.                being   interpreted  by  the   filename   expansion
  3916.                mechanism.   If  the  pattern is omitted, all func-
  3917.                tions  are  listed  except those  beginning with an
  3918.                underscore character (hidden functions).
  3919.  
  3920.                Only  functions for the current context are listed,
  3921.                so this  command may have a different effect inside
  3922.                of   a   subshell  or   function  than  when  typed
  3923.                manually.
  3924.  
  3925.      Example:  functions '[a-h]*'
  3926.  
  3927.      See Also: set
  3928.  
  3929.        _________________________________________________________________
  3930.  
  3931.  
  3932.  
  3933.  
  3934.  
  3935.  
  3936.  
  3937.  
  3938.  
  3939.  
  3940.  
  3941.  
  3942.  
  3943.  
  3944.  
  3945.  
  3946.  
  3947.  
  3948.  
  3949.  
  3950.  
  3951.  
  3952.  
  3953.  
  3954.  
  3955.  
  3956.  
  3957.        SKsh Amiga Shell            Page 60             Reference Manual
  3958.  
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964.  
  3965.  
  3966.  
  3967.        _________________________________________________________________
  3968.  
  3969.      Name:     getenv
  3970.  
  3971.      Type:     Builtin
  3972.  
  3973.      Default:  n/a
  3974.  
  3975.      Usage:    getenv [ var ... ]
  3976.  
  3977.      Range:    n/a
  3978.  
  3979.      About:    getenv  imports  the  values of the indicated vari-
  3980.                able from  AmigaDos  environment variables with the
  3981.                same  names.   This   command, coupled with  export
  3982.                command,  allows  variables to  be  transferred be-
  3983.                tween executions of SKsh.
  3984.  
  3985.      Example:  getenv my_var1 my_var2
  3986.  
  3987.      See Also: export
  3988.  
  3989.        _________________________________________________________________
  3990.  
  3991.  
  3992.  
  3993.  
  3994.  
  3995.  
  3996.  
  3997.  
  3998.  
  3999.  
  4000.  
  4001.  
  4002.  
  4003.  
  4004.  
  4005.  
  4006.  
  4007.  
  4008.  
  4009.  
  4010.  
  4011.  
  4012.  
  4013.  
  4014.  
  4015.  
  4016.  
  4017.  
  4018.  
  4019.  
  4020.  
  4021.  
  4022.  
  4023.        SKsh Amiga Shell            Page 61             Reference Manual
  4024.  
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030.  
  4031.  
  4032.  
  4033.        _________________________________________________________________
  4034.  
  4035.      Name:     histhist
  4036.  
  4037.      Type:     Script
  4038.  
  4039.      Default:  n/a
  4040.  
  4041.      Usage:    histlist
  4042.  
  4043.      Range:    n/a
  4044.  
  4045.      About:    histlist lists history files which have been  saved
  4046.                with the histsave command.
  4047.  
  4048.      Example:  histlist
  4049.  
  4050.      See Also: histsave, histrm, histload
  4051.  
  4052.        _________________________________________________________________
  4053.  
  4054.  
  4055.  
  4056.  
  4057.  
  4058.  
  4059.  
  4060.  
  4061.  
  4062.  
  4063.  
  4064.  
  4065.  
  4066.  
  4067.  
  4068.  
  4069.  
  4070.  
  4071.  
  4072.  
  4073.  
  4074.  
  4075.  
  4076.  
  4077.  
  4078.  
  4079.  
  4080.  
  4081.  
  4082.  
  4083.  
  4084.  
  4085.  
  4086.  
  4087.  
  4088.  
  4089.        SKsh Amiga Shell            Page 62             Reference Manual
  4090.  
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096.  
  4097.  
  4098.  
  4099.        _________________________________________________________________
  4100.  
  4101.      Name:     histload
  4102.  
  4103.      Type:     Script
  4104.  
  4105.      Default:  n/a
  4106.  
  4107.      Usage:    histload [ <f> ]
  4108.  
  4109.      Range:    n/a
  4110.  
  4111.      About:    histload loads the current  shell  history  from  a
  4112.                file saved with  the  savehist command.  $CMDNUM is
  4113.                set appropriately.
  4114.  
  4115.      Example:  histload session1
  4116.                histload myhist
  4117.  
  4118.      See Also: histsave, histrm, histlist
  4119.  
  4120.        _________________________________________________________________
  4121.  
  4122.  
  4123.  
  4124.  
  4125.  
  4126.  
  4127.  
  4128.  
  4129.  
  4130.  
  4131.  
  4132.  
  4133.  
  4134.  
  4135.  
  4136.  
  4137.  
  4138.  
  4139.  
  4140.  
  4141.  
  4142.  
  4143.  
  4144.  
  4145.  
  4146.  
  4147.  
  4148.  
  4149.  
  4150.  
  4151.  
  4152.  
  4153.  
  4154.  
  4155.        SKsh Amiga Shell            Page 63             Reference Manual
  4156.  
  4157.  
  4158.  
  4159.  
  4160.  
  4161.  
  4162.  
  4163.  
  4164.  
  4165.        _________________________________________________________________
  4166.  
  4167.      Name:     history
  4168.  
  4169.      Type:     Builtin
  4170.  
  4171.      Default:  n/a
  4172.  
  4173.      Usage:    history [ -n ]
  4174.                history -e [ pattern | number | offset ]
  4175.                history -c
  4176.                history -l <histfile
  4177.  
  4178.      Range:    n/a
  4179.  
  4180.      About:    SKsh  maintains the HISTSIZE previous commands in a
  4181.                list so that they may later  be  recalled or edited
  4182.                for re-execution.
  4183.  
  4184.                history  with no  parameters simply prints the his-
  4185.                tory list, with  each  line  prefixed by the number
  4186.                of  the  associated  command.   The  -n   parameter
  4187.                leaves out the line numbers.   History can be redi-
  4188.                rected to a file  for  later  loading with the his-
  4189.                tory  -l  command  (see  below).  History listed to
  4190.                the screen  will  not  exteed the window width, but
  4191.                when  directed to a file, the full  width  will  be
  4192.                printed.
  4193.  
  4194.                history  -e is  used  to  execute commands from the
  4195.                history list.  If  given  a  positive numeric argu-
  4196.                ment, it  executes the history command at that num-
  4197.                ber (note that these  numbers are derived from CMD-
  4198.                NUM and do not  always begin at 1 if CMDNUM > HIST-
  4199.                SIZE).  If given  a  negative numeric argument, the
  4200.                line  executed  is  the  'nth'  before the current;
  4201.                thus,  the  example  below  executes  the  previous
  4202.                command.  If  the  argument is a string or pattern,
  4203.                the  most  recent command containing that string or
  4204.                pattern is executed.
  4205.  
  4206.                history  -c clears the existing history list, while
  4207.                maintaining the value of $CMDNUM.
  4208.  
  4209.                history -l  <histfile reads a previously saved his-
  4210.                tory file into  SKsh's  internal history file.  The
  4211.                histfile  must  be  generated by redirecting a his-
  4212.                tory  listing to a  file  (ie,  history >histfile).
  4213.                SKsh will  issue an error message if it cannot read
  4214.                the  history file.  The value of CMDNUM will be set
  4215.                according to its value in the file.   None  of  the
  4216.                other  history  related  variables  (MAXDIST,  etc)
  4217.                will be  changed.   This  feature is useful to save
  4218.                history lists between invocations of SKsh.
  4219.  
  4220.  
  4221.        SKsh Amiga Shell            Page 64             Reference Manual
  4222.  
  4223.  
  4224.  
  4225.  
  4226.  
  4227.  
  4228.  
  4229.  
  4230.  
  4231.  
  4232.      Example:  history -e -1       # execute previous command
  4233.                history >myfile     # save history in "myfile"
  4234.                history -l <myfile  # load history from "myfile"
  4235.  
  4236.      See Also: HISTSIZE, !, !!, CMDNUM, command  line  editing  in
  4237.                the User's Manual.
  4238.  
  4239.        _________________________________________________________________
  4240.  
  4241.  
  4242.  
  4243.  
  4244.  
  4245.  
  4246.  
  4247.  
  4248.  
  4249.  
  4250.  
  4251.  
  4252.  
  4253.  
  4254.  
  4255.  
  4256.  
  4257.  
  4258.  
  4259.  
  4260.  
  4261.  
  4262.  
  4263.  
  4264.  
  4265.  
  4266.  
  4267.  
  4268.  
  4269.  
  4270.  
  4271.  
  4272.  
  4273.  
  4274.  
  4275.  
  4276.  
  4277.  
  4278.  
  4279.  
  4280.  
  4281.  
  4282.  
  4283.  
  4284.  
  4285.  
  4286.  
  4287.        SKsh Amiga Shell            Page 65             Reference Manual
  4288.  
  4289.  
  4290.  
  4291.  
  4292.  
  4293.  
  4294.  
  4295.  
  4296.  
  4297.        _________________________________________________________________
  4298.  
  4299.      Name:     histrm
  4300.  
  4301.      Type:     Script
  4302.  
  4303.      Default:  n/a
  4304.  
  4305.      Usage:    histrm
  4306.  
  4307.      Range:    n/a
  4308.  
  4309.      About:    histrm removes all history files  which  have  been
  4310.                saved with the histsave command.
  4311.  
  4312.      Example:  histrm
  4313.  
  4314.      See Also: histsave, histlist, histload
  4315.  
  4316.        _________________________________________________________________
  4317.  
  4318.  
  4319.  
  4320.  
  4321.  
  4322.  
  4323.  
  4324.  
  4325.  
  4326.  
  4327.  
  4328.  
  4329.  
  4330.  
  4331.  
  4332.  
  4333.  
  4334.  
  4335.  
  4336.  
  4337.  
  4338.  
  4339.  
  4340.  
  4341.  
  4342.  
  4343.  
  4344.  
  4345.  
  4346.  
  4347.  
  4348.  
  4349.  
  4350.  
  4351.  
  4352.  
  4353.        SKsh Amiga Shell            Page 66             Reference Manual
  4354.  
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360.  
  4361.  
  4362.  
  4363.        _________________________________________________________________
  4364.  
  4365.      Name:     histsave
  4366.  
  4367.      Type:     Script
  4368.  
  4369.      Default:  n/a
  4370.  
  4371.      Usage:    histsave [ <f> ]
  4372.  
  4373.      Range:    n/a
  4374.  
  4375.      About:    histsave saves the  current shell history in a file
  4376.                named  s:SKsh_Hist.<f>.   If   ommitted, <f> is the
  4377.                current $CLINUM  string.   History can later be re-
  4378.                loaded with the histload command.
  4379.  
  4380.      Example:  histsave session1
  4381.                histsave myhist
  4382.  
  4383.      See Also: histload, histrm, histlist
  4384.  
  4385.        _________________________________________________________________
  4386.  
  4387.  
  4388.  
  4389.  
  4390.  
  4391.  
  4392.  
  4393.  
  4394.  
  4395.  
  4396.  
  4397.  
  4398.  
  4399.  
  4400.  
  4401.  
  4402.  
  4403.  
  4404.  
  4405.  
  4406.  
  4407.  
  4408.  
  4409.  
  4410.  
  4411.  
  4412.  
  4413.  
  4414.  
  4415.  
  4416.  
  4417.  
  4418.  
  4419.        SKsh Amiga Shell            Page 67             Reference Manual
  4420.  
  4421.  
  4422.  
  4423.  
  4424.  
  4425.  
  4426.  
  4427.  
  4428.  
  4429.        _________________________________________________________________
  4430.  
  4431.      Name:     HISTSIZE
  4432.  
  4433.      Type:     Variable
  4434.  
  4435.      Default:  32
  4436.  
  4437.      Usage:    $HISTSIZE
  4438.  
  4439.      Range:    0 to 32000
  4440.  
  4441.      About:    SKsh keeps a list  of  the  $HISTSIZE  most  recent
  4442.                commands available for editing and re-entry.
  4443.  
  4444.      Example:  HISTSIZE=64
  4445.  
  4446.      See Also: history, options
  4447.  
  4448.        _________________________________________________________________
  4449.  
  4450.  
  4451.  
  4452.  
  4453.  
  4454.  
  4455.  
  4456.  
  4457.  
  4458.  
  4459.  
  4460.  
  4461.  
  4462.  
  4463.  
  4464.  
  4465.  
  4466.  
  4467.  
  4468.  
  4469.  
  4470.  
  4471.  
  4472.  
  4473.  
  4474.  
  4475.  
  4476.  
  4477.  
  4478.  
  4479.  
  4480.  
  4481.  
  4482.  
  4483.  
  4484.  
  4485.        SKsh Amiga Shell            Page 68             Reference Manual
  4486.  
  4487.  
  4488.  
  4489.  
  4490.  
  4491.  
  4492.  
  4493.  
  4494.  
  4495.        _________________________________________________________________
  4496.  
  4497.      Name:     HOME
  4498.  
  4499.      Type:     Variable
  4500.  
  4501.      Default:  :
  4502.  
  4503.      Usage:    $HOME
  4504.  
  4505.      Range:    n/a
  4506.  
  4507.      About:    This  variable  represents the  default destination
  4508.                for  the  cd command.  It can be set to  any  valid
  4509.                directory name.
  4510.  
  4511.      Example:  HOME=.
  4512.  
  4513.      See Also: cd
  4514.  
  4515.        _________________________________________________________________
  4516.  
  4517.  
  4518.  
  4519.  
  4520.  
  4521.  
  4522.  
  4523.  
  4524.  
  4525.  
  4526.  
  4527.  
  4528.  
  4529.  
  4530.  
  4531.  
  4532.  
  4533.  
  4534.  
  4535.  
  4536.  
  4537.  
  4538.  
  4539.  
  4540.  
  4541.  
  4542.  
  4543.  
  4544.  
  4545.  
  4546.  
  4547.  
  4548.  
  4549.  
  4550.  
  4551.        SKsh Amiga Shell            Page 69             Reference Manual
  4552.  
  4553.  
  4554.  
  4555.  
  4556.  
  4557.  
  4558.  
  4559.  
  4560.  
  4561.        _________________________________________________________________
  4562.  
  4563.      Name:     if/then/elif/else/fi
  4564.  
  4565.      Type:     Keywords
  4566.  
  4567.      Default:  n/a
  4568.  
  4569.      Usage:    if expr then stmt_list
  4570.                   [ [ elif expr then stmt_list ] ... ]
  4571.                   [ else stmt_list ] fi
  4572.  
  4573.      Range:    n/a
  4574.  
  4575.      About:    If  the  expression is true (that is, it  returns a
  4576.                zero  exit  status), then the first  statement list
  4577.                is executed.  If  any  elif statements are present,
  4578.                each  expression  is  executed, and if it is  true,
  4579.                execution  procedes  for  the  associated statement
  4580.                list.  If none  of  the  expressions were true, the
  4581.                else statement_list is executed.
  4582.  
  4583.                The  expressions can be any  command, or a test ex-
  4584.                pression  surrounded  by  square  brackets (see the
  4585.                user's manual for details).
  4586.  
  4587.      Example:  if [ ! -f name -a ! -d name ]
  4588.                then
  4589.                   mkdir name
  4590.                else
  4591.                   echo "$name exists already!"
  4592.                fi
  4593.  
  4594.      See Also: while
  4595.  
  4596.        _________________________________________________________________
  4597.  
  4598.  
  4599.  
  4600.  
  4601.  
  4602.  
  4603.  
  4604.  
  4605.  
  4606.  
  4607.  
  4608.  
  4609.  
  4610.  
  4611.  
  4612.  
  4613.  
  4614.  
  4615.  
  4616.  
  4617.        SKsh Amiga Shell            Page 70             Reference Manual
  4618.  
  4619.  
  4620.  
  4621.  
  4622.  
  4623.  
  4624.  
  4625.  
  4626.  
  4627.        _________________________________________________________________
  4628.  
  4629.      Name:     IFS
  4630.  
  4631.      Type:     Variable
  4632.  
  4633.      Default:  " \n\t"
  4634.  
  4635.      Usage:    $IFS
  4636.  
  4637.      Range:    n/a
  4638.  
  4639.      About:    Characters in IFS are  used  to  break  substituted
  4640.                text  (from  variables  and  command  substitution)
  4641.                into parameters.  If IFS is set to the null  string
  4642.                (''),  all   substituted  text  will  be  a  single
  4643.                parameter.
  4644.  
  4645.                If the  'i'  option to SKsh is set (see the options
  4646.                command), the  IFS  characters will also be used to
  4647.                break text from $( ) style command substitution.
  4648.  
  4649.      Example:  [dh0:]: IFS=" \n\t"
  4650.                [dh0:]: a='Now   is   the   time'
  4651.                [dh0:]: echo $a
  4652.                        Now is the time
  4653.                [dh0:]: IFS=''
  4654.                [dh0:]: echo $a
  4655.                        Now   is   the   time
  4656.  
  4657.      See Also:
  4658.  
  4659.        _________________________________________________________________
  4660.  
  4661.  
  4662.  
  4663.  
  4664.  
  4665.  
  4666.  
  4667.  
  4668.  
  4669.  
  4670.  
  4671.  
  4672.  
  4673.  
  4674.  
  4675.  
  4676.  
  4677.  
  4678.  
  4679.  
  4680.  
  4681.  
  4682.  
  4683.        SKsh Amiga Shell            Page 71             Reference Manual
  4684.  
  4685.  
  4686.  
  4687.  
  4688.  
  4689.  
  4690.  
  4691.  
  4692.  
  4693.        _________________________________________________________________
  4694.  
  4695.      Name:     inc
  4696.  
  4697.      Type:     Builtin
  4698.  
  4699.      Default:  n/a
  4700.  
  4701.      Usage:    inc var [ count ]
  4702.  
  4703.      Range:    n/a
  4704.  
  4705.      About:    inc  increments  the  contents of  the  variable by
  4706.                count, or 1 if count is not given.  It  is  equiva-
  4707.                lent  to,  but  faster  than,  'var=$(expr  $var  +
  4708.                $count)'
  4709.  
  4710.      Example:  inc my_var 3
  4711.  
  4712.      See Also: dec
  4713.  
  4714.        _________________________________________________________________
  4715.  
  4716.  
  4717.  
  4718.  
  4719.  
  4720.  
  4721.  
  4722.  
  4723.  
  4724.  
  4725.  
  4726.  
  4727.  
  4728.  
  4729.  
  4730.  
  4731.  
  4732.  
  4733.  
  4734.  
  4735.  
  4736.  
  4737.  
  4738.  
  4739.  
  4740.  
  4741.  
  4742.  
  4743.  
  4744.  
  4745.  
  4746.  
  4747.  
  4748.  
  4749.        SKsh Amiga Shell            Page 72             Reference Manual
  4750.  
  4751.  
  4752.  
  4753.  
  4754.  
  4755.  
  4756.  
  4757.  
  4758.  
  4759.        _________________________________________________________________
  4760.  
  4761.      Name:     info
  4762.  
  4763.      Type:     Builtin
  4764.  
  4765.      Default:  n/a
  4766.  
  4767.      Usage:    info [ -a ] [ device | directory ] ...
  4768.  
  4769.      Range:    n/a
  4770.  
  4771.      About:    info  reports the amount of free space available on
  4772.                a  given  device or  directory.   It  prints  total
  4773.                space  in  kilobytes, used space in  kilobytes, the
  4774.                free space  in  kilobytes, the state of the device,
  4775.                the  number of bytes per block, the  percentage ca-
  4776.                pacity  utilization,  the  total  number of errors,
  4777.                and the  volume name.  If info is given a directory
  4778.                name as an  argument, the free space for the direc-
  4779.                tory is the same as the free space for  the  device
  4780.                on which the directory resides.
  4781.  
  4782.                The  SKsh  info  command  reports data in 1024 byte
  4783.                kilobytes, not 1000 byte kilobytes.  This may  lead
  4784.                to  a  slightly  different  answer than other  info
  4785.                commands.   The  SKsh   info command will deal cor-
  4786.                rectly   with   file   systems  of  up  to  several
  4787.                gigabytes  (should  you   happen  to  have  one  of
  4788.                those).
  4789.  
  4790.  
  4791.                If  the  info command is given the -a flag, it will
  4792.                report  information on  all  the  currently mounted
  4793.                devices.
  4794.  
  4795.  
  4796.      Example:  info sys: ram: df0:
  4797.                info -a       # info for all devices
  4798.  
  4799.      See Also:
  4800.  
  4801.        _________________________________________________________________
  4802.  
  4803.  
  4804.  
  4805.  
  4806.  
  4807.  
  4808.  
  4809.  
  4810.  
  4811.  
  4812.  
  4813.  
  4814.  
  4815.        SKsh Amiga Shell            Page 73             Reference Manual
  4816.  
  4817.  
  4818.  
  4819.  
  4820.  
  4821.  
  4822.  
  4823.  
  4824.  
  4825.        _________________________________________________________________
  4826.  
  4827.      Name:     INTERACTIVE
  4828.  
  4829.      Type:     Variable
  4830.  
  4831.      Default:  TRUE for interactive sessions
  4832.                FALSE otherwise
  4833.  
  4834.      Usage:    $INTERACTIVE
  4835.  
  4836.      Range:    TRUE or FALSE
  4837.  
  4838.      About:    This variable stores  the  string  "TRUE"  if  this
  4839.                SKsh   session   is   interactive,   and    "FALSE"
  4840.                otherwise.  For example, if SKsh is started via:
  4841.  
  4842.                  sksh -c "mycommand string"
  4843.                or
  4844.                  sksh myscript.sksh
  4845.  
  4846.                the INTERACTIVE variable will contain  "FALSE",  as
  4847.                SKsh will simply execute the  commands  or  scripts
  4848.                and exit immediately thereafter.  However, if  SKsh
  4849.                is started such that the prompt  is  displayed  and
  4850.                commands  may   be   typed   from   the   keyboard,
  4851.                INTERACTIVE will be set to TRUE.
  4852.  
  4853.                Currently, the .skshrc  file  is  not  sourced  for
  4854.                non-interactive sessions.  This is to  prevent  any
  4855.                output from the .skshrc  from  appearing  when  not
  4856.                desired.  However, an  unfortunate  side-effect  of
  4857.                this is that any aliases, functions, and  variables
  4858.                set up in the .skshrc file  are  not  available  to
  4859.                the  non-interactive  invocation  of   SKsh.    The
  4860.                INTERACTIVE  variable  is  intended  to  provide  a
  4861.                workaround for this problem.  It can be tested  for
  4862.                in the .skshrc file, and certain actions  can  take
  4863.                place  only  for  interactive  sessions  (See   the
  4864.                example below).
  4865.  
  4866.                In SKsh 1.6, the .skshrc file is still not  sourced
  4867.                for non-interactive sessions.  However,  this  will
  4868.                change in SKsh  1.7,  so  you  should  modify  your
  4869.                .skshrc file accordingly.
  4870.  
  4871.      Example:  The following can be used as a test in .skshrc:
  4872.  
  4873.                if [ "$INTERACTIVE" = 'true' ]
  4874.                then
  4875.                   echo "\nWelcome to SKsh\n"
  4876.                fi
  4877.  
  4878.      Notes:    You may also want to put the following  statements,
  4879.  
  4880.  
  4881.        SKsh Amiga Shell            Page 74             Reference Manual
  4882.  
  4883.  
  4884.  
  4885.  
  4886.  
  4887.  
  4888.  
  4889.  
  4890.  
  4891.                if used, inside the interactive test:
  4892.  
  4893.                  complist
  4894.                  cilist
  4895.                  statements which set HISTSIZE, MAXDIST,
  4896.                  function key variables, etc.
  4897.  
  4898.      See Also: sksh, SKSHINIT
  4899.  
  4900.        _________________________________________________________________
  4901.  
  4902.  
  4903.  
  4904.  
  4905.  
  4906.  
  4907.  
  4908.  
  4909.  
  4910.  
  4911.  
  4912.  
  4913.  
  4914.  
  4915.  
  4916.  
  4917.  
  4918.  
  4919.  
  4920.  
  4921.  
  4922.  
  4923.  
  4924.  
  4925.  
  4926.  
  4927.  
  4928.  
  4929.  
  4930.  
  4931.  
  4932.  
  4933.  
  4934.  
  4935.  
  4936.  
  4937.  
  4938.  
  4939.  
  4940.  
  4941.  
  4942.  
  4943.  
  4944.  
  4945.  
  4946.  
  4947.        SKsh Amiga Shell            Page 75             Reference Manual
  4948.  
  4949.  
  4950.  
  4951.  
  4952.  
  4953.  
  4954.  
  4955.  
  4956.  
  4957.        _________________________________________________________________
  4958.  
  4959.      Name:     LASTRC
  4960.  
  4961.      Type:     Variable
  4962.  
  4963.      Default:  n/a
  4964.  
  4965.      Usage:    $LASTRC
  4966.  
  4967.      Range:    n/a
  4968.  
  4969.      About:    LASTRC stores the  return code from the last exter-
  4970.                nal  command which was executed.  It is  not  reset
  4971.                by  subsequent internal command return codes, as is
  4972.                $?.
  4973.  
  4974.      Example:  some_external_command
  4975.                echo
  4976.                if [ $LASTRC -ne 0 ]
  4977.                then
  4978.                   echo 'command failed!'
  4979.                fi
  4980.  
  4981.      See Also: $?
  4982.  
  4983.        _________________________________________________________________
  4984.  
  4985.  
  4986.  
  4987.  
  4988.  
  4989.  
  4990.  
  4991.  
  4992.  
  4993.  
  4994.  
  4995.  
  4996.  
  4997.  
  4998.  
  4999.  
  5000.  
  5001.  
  5002.  
  5003.  
  5004.  
  5005.  
  5006.  
  5007.  
  5008.  
  5009.  
  5010.  
  5011.  
  5012.  
  5013.        SKsh Amiga Shell            Page 76             Reference Manual
  5014.  
  5015.  
  5016.  
  5017.  
  5018.  
  5019.  
  5020.  
  5021.  
  5022.  
  5023.        _________________________________________________________________
  5024.  
  5025.      Name:     line
  5026.  
  5027.      Type:     Builtin
  5028.  
  5029.      Default:  n/a
  5030.  
  5031.      Usage:    line var [ prompt [ pnpc ] ]
  5032.  
  5033.      Range:    n/a
  5034.  
  5035.      About:    The  line  command  functions  similar to read, but
  5036.                allows the use of the full SKsh  command line edit-
  5037.                ing  facilities to  input lines.  line may only in-
  5038.                put lines from the  keyboard, not a file.  The syn-
  5039.                tax is:
  5040.  
  5041.                line var [ prompt ] [ pnpc ]
  5042.  
  5043.                Where  pnpc  is  similar to the  PNPC variable, but
  5044.                for  this   prompt.    (See   the   PNPC  entry  in
  5045.                Reference.doc for details).
  5046.  
  5047.                line is  recommended instead of read wherever input
  5048.                is to always be read from the keyboard.
  5049.  
  5050.      Example:  line myvar "${_ANSI_P3}My prompt >$_ANSI_P1 " 20
  5051.                echo "$myvar"
  5052.  
  5053.                line myvar "My propmt > "
  5054.                echo "$myvar"
  5055.  
  5056.      See Also: read
  5057.  
  5058.        _________________________________________________________________
  5059.  
  5060.  
  5061.  
  5062.  
  5063.  
  5064.  
  5065.  
  5066.  
  5067.  
  5068.  
  5069.  
  5070.  
  5071.  
  5072.  
  5073.  
  5074.  
  5075.  
  5076.  
  5077.  
  5078.  
  5079.        SKsh Amiga Shell            Page 77             Reference Manual
  5080.  
  5081.  
  5082.  
  5083.  
  5084.  
  5085.  
  5086.  
  5087.  
  5088.  
  5089.        _________________________________________________________________
  5090.  
  5091.      Name:     LINES
  5092.  
  5093.      Type:     Variable
  5094.  
  5095.      Default:  24
  5096.  
  5097.      Usage:    $LINES
  5098.  
  5099.      Range:    3 to anything
  5100.  
  5101.      About:    This  variable is currently not used by SKsh; it is
  5102.                provided  for  future  expansion, and for other ap-
  5103.                plications or programs which might be interested.
  5104.  
  5105.                This  variable  is  automatically set by SKsh  when
  5106.                the  window  is  resized.   This   behavior can  be
  5107.                turned off with the options command.
  5108.  
  5109.      Example:  if [ $LINES -lt 20 ]
  5110.                then
  5111.                   echo "We require at least 20 lines!"
  5112.                fi
  5113.  
  5114.      See Also: COLUMNS, options
  5115.  
  5116.        _________________________________________________________________
  5117.  
  5118.  
  5119.  
  5120.  
  5121.  
  5122.  
  5123.  
  5124.  
  5125.  
  5126.  
  5127.  
  5128.  
  5129.  
  5130.  
  5131.  
  5132.  
  5133.  
  5134.  
  5135.  
  5136.  
  5137.  
  5138.  
  5139.  
  5140.  
  5141.  
  5142.  
  5143.  
  5144.  
  5145.        SKsh Amiga Shell            Page 78             Reference Manual
  5146.  
  5147.  
  5148.  
  5149.  
  5150.  
  5151.  
  5152.  
  5153.  
  5154.  
  5155.        _________________________________________________________________
  5156.  
  5157.      Name:     ll
  5158.  
  5159.      Type:     Alias
  5160.  
  5161.      Default:  ls -lbF
  5162.  
  5163.      Usage:    ll [ file | dir ] ...
  5164.  
  5165.      Range:    n/a
  5166.  
  5167.      About:    ll  prints  a  long  format directory listing, with
  5168.                only the basename of each file printed.  Note  that
  5169.                the 'F' option to 'ls' is set.
  5170.  
  5171.      Example:  ll s:
  5172.  
  5173.      See Also: dir, ls
  5174.  
  5175.        _________________________________________________________________
  5176.  
  5177.  
  5178.  
  5179.  
  5180.  
  5181.  
  5182.  
  5183.  
  5184.  
  5185.  
  5186.  
  5187.  
  5188.  
  5189.  
  5190.  
  5191.  
  5192.  
  5193.  
  5194.  
  5195.  
  5196.  
  5197.  
  5198.  
  5199.  
  5200.  
  5201.  
  5202.  
  5203.  
  5204.  
  5205.  
  5206.  
  5207.  
  5208.  
  5209.  
  5210.  
  5211.        SKsh Amiga Shell            Page 79             Reference Manual
  5212.  
  5213.  
  5214.  
  5215.  
  5216.  
  5217.  
  5218.  
  5219.  
  5220.  
  5221.        _________________________________________________________________
  5222.  
  5223.      Name:     LLMIN
  5224.  
  5225.      Type:     Variable
  5226.  
  5227.      Default:  4
  5228.  
  5229.      Usage:    $LLMIN
  5230.  
  5231.      Range:    0 to 1023 inclusive
  5232.  
  5233.      About:    LLMIN  stores  the  minimum command line length for
  5234.                which SKsh will  store  the  line  in  the  history
  5235.                list.   Put   another way, lines shorter than  this
  5236.                value are not  inserted into the history list.  For
  5237.                example, a  line  containing only "cd" would be ig-
  5238.                nored, as it is just as easy to re-type  as  it  is
  5239.                to search for in the history list.
  5240.  
  5241.      Example:  LLMIN=0 # don't ignore any lines, even short ones
  5242.  
  5243.      See Also: MAXDIST, options
  5244.  
  5245.        _________________________________________________________________
  5246.  
  5247.  
  5248.  
  5249.  
  5250.  
  5251.  
  5252.  
  5253.  
  5254.  
  5255.  
  5256.  
  5257.  
  5258.  
  5259.  
  5260.  
  5261.  
  5262.  
  5263.  
  5264.  
  5265.  
  5266.  
  5267.  
  5268.  
  5269.  
  5270.  
  5271.  
  5272.  
  5273.  
  5274.  
  5275.  
  5276.  
  5277.        SKsh Amiga Shell            Page 80             Reference Manual
  5278.  
  5279.  
  5280.  
  5281.  
  5282.  
  5283.  
  5284.  
  5285.  
  5286.  
  5287.        _________________________________________________________________
  5288.  
  5289.      Name:     local
  5290.  
  5291.      Type:     Builtin
  5292.  
  5293.      Default:  n/a
  5294.  
  5295.      Usage:    local [ varname ... ]
  5296.  
  5297.      Range:    n/a
  5298.  
  5299.      About:    The  local  command can be used to enforce the cre-
  5300.                ation of  local variables if the 'N' option and the
  5301.                'l' to SKsh  are  set  (see  the  options command).
  5302.                Normally with the  'N'  option set, local variables
  5303.                are  created only if  they  had  not  been  created
  5304.                first in  an  enclosing context.  The local command
  5305.                makes  them  local even if there had been a  previ-
  5306.                ously  defined  variable of the same name in an en-
  5307.                closing context.  Note that this  command will have
  5308.                no  effect if SKsh  local variables are disabled by
  5309.                turning off the 'l' option.
  5310.  
  5311.      Example:  function my_func {
  5312.                   local answer;
  5313.                   answer = 42
  5314.                }
  5315.  
  5316.      See Also: options
  5317.  
  5318.        _________________________________________________________________
  5319.  
  5320.  
  5321.  
  5322.  
  5323.  
  5324.  
  5325.  
  5326.  
  5327.  
  5328.  
  5329.  
  5330.  
  5331.  
  5332.  
  5333.  
  5334.  
  5335.  
  5336.  
  5337.  
  5338.  
  5339.  
  5340.  
  5341.  
  5342.  
  5343.        SKsh Amiga Shell            Page 81             Reference Manual
  5344.  
  5345.  
  5346.  
  5347.  
  5348.  
  5349.  
  5350.  
  5351.  
  5352.  
  5353.        _________________________________________________________________
  5354.  
  5355.      Name:     LOGOUT
  5356.  
  5357.      Type:     Variable
  5358.  
  5359.      Default:  'echo "\nBye!\n"'
  5360.  
  5361.      Usage:    $LOGOUT
  5362.  
  5363.      Range:    n/a
  5364.  
  5365.      About:    The text of this variable is executed by SKsh  when
  5366.                the exit command is used to terminate execution.
  5367.  
  5368.      Example:  LOGOUT='';    # do nothing
  5369.  
  5370.      See Also: exit
  5371.  
  5372.        _________________________________________________________________
  5373.  
  5374.  
  5375.  
  5376.  
  5377.  
  5378.  
  5379.  
  5380.  
  5381.  
  5382.  
  5383.  
  5384.  
  5385.  
  5386.  
  5387.  
  5388.  
  5389.  
  5390.  
  5391.  
  5392.  
  5393.  
  5394.  
  5395.  
  5396.  
  5397.  
  5398.  
  5399.  
  5400.  
  5401.  
  5402.  
  5403.  
  5404.  
  5405.  
  5406.  
  5407.  
  5408.  
  5409.        SKsh Amiga Shell            Page 82             Reference Manual
  5410.  
  5411.  
  5412.  
  5413.  
  5414.  
  5415.  
  5416.  
  5417.  
  5418.  
  5419.        _________________________________________________________________
  5420.  
  5421.      Name:     ls
  5422.  
  5423.      Type:     Builtin
  5424.  
  5425.      Default:  n/a
  5426.  
  5427.      Usage:    ls [ -aldhi1bvF ] [ dirname | fname ] ...
  5428.  
  5429.      Range:    n/a
  5430.  
  5431.      About:    This  command is used  to  obtain information about
  5432.                files or directories.  With  no  arguments, it sim-
  5433.                ply lists  the  contents of the current working di-
  5434.                rectory,  leaving out  files  beginning with a dot.
  5435.                If the  'I'  option to SKsh is set (see the options
  5436.                command), all .info files are also left  out  (this
  5437.                feature exists because I hate .info files).
  5438.  
  5439.                The  'a'  option causes  ls to list files beginning
  5440.                with a dot.   Similarly, the 'i' option lists .info
  5441.                files even if the  'I'  option to SKsh is set.  The
  5442.                'h' option lists files with the hidden bit set.
  5443.  
  5444.                The  'l'  option  creates a long  format list, with
  5445.                filename,   protection  status,  byte  size,  block
  5446.                size,  and  modification date listed.  (The ll com-
  5447.                mand has been aliased  to  'ls  -l'  to  make  this
  5448.                easier).
  5449.  
  5450.                The  '1'  option  creates a short  format list with
  5451.                one  column  instead  of  three  (useful for piping
  5452.                filenames into a command).
  5453.  
  5454.                The 'd'  option forces directories to be printed as
  5455.                such.    Normally if the  ls command is given a di-
  5456.                rectory as  an  argument, it prints the contents of
  5457.                that directory.  The 'd'  option prints information
  5458.                on  the  directory itself.  This is useful with the
  5459.                'l'  option to find  the  modification date or pro-
  5460.                tection status of a directory.
  5461.  
  5462.                The  'b'  option causes only the basename  of  each
  5463.                file to be printed.   Normally, if a path to a file
  5464.                is given, SKsh will print the  path  information in
  5465.                each  entry  in  the  ls output.   The  'b'  option
  5466.                leaves out the path  information, printing only the
  5467.                basename.
  5468.  
  5469.                The  'v'  option prints a count  of  entries listed
  5470.                after  the  listing  itself.   Also,  a  total byte
  5471.                count is printed, which is the sum of the sizes  of
  5472.                each file listed.
  5473.  
  5474.  
  5475.        SKsh Amiga Shell            Page 83             Reference Manual
  5476.  
  5477.  
  5478.  
  5479.  
  5480.  
  5481.  
  5482.  
  5483.  
  5484.  
  5485.  
  5486.                The 'F'  option instructs 'ls' to output the appro-
  5487.                priate _FILE_S, _FILE_E, _DIR_S,  _DIR_E,  _EXEC_S,
  5488.                and  _EXEC_E  variables  before and after each file
  5489.                name printed in  either the short or long directory
  5490.                format.  See  the  documentation on those variables
  5491.                for details on their usage.
  5492.  
  5493.                The short form  of  the  ls command normally prints
  5494.                the files in columns.   To  decide how many columns
  5495.                there  should  be,  it  examines the $COLUMNS vari-
  5496.                able,  divides  the  result by the  length  of  the
  5497.                longest file name to  be  printed,  and  insures at
  5498.                least a three character gutter between columns.
  5499.  
  5500.                The  ls  command outputs an error message if passed
  5501.                an  argument  which  does  not  exist as a file  or
  5502.                directory.
  5503.  
  5504.      Example:  ls -li my_dir   # list my_dir including info files
  5505.  
  5506.      See Also: options, dir, ll
  5507.  
  5508.        _________________________________________________________________
  5509.  
  5510.  
  5511.  
  5512.  
  5513.  
  5514.  
  5515.  
  5516.  
  5517.  
  5518.  
  5519.  
  5520.  
  5521.  
  5522.  
  5523.  
  5524.  
  5525.  
  5526.  
  5527.  
  5528.  
  5529.  
  5530.  
  5531.  
  5532.  
  5533.  
  5534.  
  5535.  
  5536.  
  5537.  
  5538.  
  5539.  
  5540.  
  5541.        SKsh Amiga Shell            Page 84             Reference Manual
  5542.  
  5543.  
  5544.  
  5545.  
  5546.  
  5547.  
  5548.  
  5549.  
  5550.  
  5551.        _________________________________________________________________
  5552.  
  5553.      Name:     man
  5554.  
  5555.      Type:     Script
  5556.  
  5557.      Default:  n/a
  5558.  
  5559.      Usage:    man man_entry
  5560.  
  5561.      Range:    n/a
  5562.  
  5563.      About:    man  is  used  to  display  entries from  the  MAN:
  5564.                directory.  MAN: should be set up  to  a  directory
  5565.                containing *.doc, *.man, and *.txt files.   If  man
  5566.                files a file with the passed  in  prefix and one of
  5567.                the above  suffixes, it will display that entry us-
  5568.                ing  either "more", or  the  program name stored in
  5569.                the  PAGER variable, if set.  For example, to exam-
  5570.                ine  man  entries with the "sys:usr/bin/less"  pro-
  5571.                gram, set PAGER to "sys:usr/bin/less".
  5572.  
  5573.                Most  free  software comes with some sort  of  "RE-
  5574.                ADME"  or  documentation file; these can be  copied
  5575.                into the MAN:  directory under the name <prog>.MAN,
  5576.                where <prog> is the name of  the  software package.
  5577.                These  files  can  then  be  conveniently retrieved
  5578.                with the man command.
  5579.  
  5580.      Example:  man myprog
  5581.  
  5582.      See Also: PAGER
  5583.  
  5584.        _________________________________________________________________
  5585.  
  5586.  
  5587.  
  5588.  
  5589.  
  5590.  
  5591.  
  5592.  
  5593.  
  5594.  
  5595.  
  5596.  
  5597.  
  5598.  
  5599.  
  5600.  
  5601.  
  5602.  
  5603.  
  5604.  
  5605.  
  5606.  
  5607.        SKsh Amiga Shell            Page 85             Reference Manual
  5608.  
  5609.  
  5610.  
  5611.  
  5612.  
  5613.  
  5614.  
  5615.  
  5616.  
  5617.        _________________________________________________________________
  5618.  
  5619.      Name:     MANPATH
  5620.  
  5621.      Type:     Variable
  5622.  
  5623.      Default:  MAN:,MAN:SKsh
  5624.  
  5625.      Usage:    $MANPATH
  5626.  
  5627.      Range:    n/a
  5628.  
  5629.      About:    If  MANPATH is set to a  list  of  comma  separated
  5630.                list  of  directory  names,  the  man  command will
  5631.                search those  directories for manpage entries.  The
  5632.                MANPATH  variable should not be  set  directly, but
  5633.                rather, be set through the  -man option to the path
  5634.                command.
  5635.  
  5636.      Example:  path -man -add MAN:subdir1 MAN:subdir2
  5637.                man myfile1      # myfile1 is in MAN:subdir1 or 2
  5638.  
  5639.      See Also: man, path
  5640.  
  5641.        _________________________________________________________________
  5642.  
  5643.  
  5644.  
  5645.  
  5646.  
  5647.  
  5648.  
  5649.  
  5650.  
  5651.  
  5652.  
  5653.  
  5654.  
  5655.  
  5656.  
  5657.  
  5658.  
  5659.  
  5660.  
  5661.  
  5662.  
  5663.  
  5664.  
  5665.  
  5666.  
  5667.  
  5668.  
  5669.  
  5670.  
  5671.  
  5672.  
  5673.        SKsh Amiga Shell            Page 86             Reference Manual
  5674.  
  5675.  
  5676.  
  5677.  
  5678.  
  5679.  
  5680.  
  5681.  
  5682.  
  5683.        _________________________________________________________________
  5684.  
  5685.      Name:     match
  5686.  
  5687.      Type:     Builtin
  5688.  
  5689.      Default:  n/a
  5690.  
  5691.      Usage:    match [ -v ] pattern [ string ... ]
  5692.  
  5693.      Range:    n/a
  5694.  
  5695.      About:    match prints each string that matches  the  pattern
  5696.                given in the  first  argument.   The  pattern is of
  5697.                the same type used by SKsh for filename  wildcards,
  5698.                but it must be quoted  to  avoid  being expanded in
  5699.                that manner.  If the 'v' flag is set, only  strings
  5700.                not matching the pattern are printed.
  5701.  
  5702.      Example:  match '*.[ch]' file1.foo file1.c file2.h my_file
  5703.  
  5704.      See Also:
  5705.  
  5706.        _________________________________________________________________
  5707.  
  5708.  
  5709.  
  5710.  
  5711.  
  5712.  
  5713.  
  5714.  
  5715.  
  5716.  
  5717.  
  5718.  
  5719.  
  5720.  
  5721.  
  5722.  
  5723.  
  5724.  
  5725.  
  5726.  
  5727.  
  5728.  
  5729.  
  5730.  
  5731.  
  5732.  
  5733.  
  5734.  
  5735.  
  5736.  
  5737.  
  5738.  
  5739.        SKsh Amiga Shell            Page 87             Reference Manual
  5740.  
  5741.  
  5742.  
  5743.  
  5744.  
  5745.  
  5746.  
  5747.  
  5748.  
  5749.        _________________________________________________________________
  5750.  
  5751.      Name:     MAXDIST
  5752.  
  5753.      Type:     Variable
  5754.  
  5755.      Default:  5
  5756.  
  5757.      Usage:    $MAXDIST
  5758.  
  5759.      Range:    0 to 32000 inclusive
  5760.  
  5761.      About:    When  a  command is  entered from the keyboard with
  5762.                line  editing enabled, SKsh checks for an identical
  5763.                line  in  the  history list.  If one is found  less
  5764.                than $MAXDIST lines away, the new one  is  not  en-
  5765.                tered into the  history list.  This has two benefi-
  5766.                cial effects.  First, if  the  same  command is en-
  5767.                tered  several times in a row, it will only  appear
  5768.                once in  the  history list.  Second, commands which
  5769.                have not  been  entered for a long time will be en-
  5770.                tered again so they do not scroll  of  the  end  of
  5771.                the list.   This  rule  applies whether the command
  5772.                was typed or  accessed from a previous history list
  5773.                entry.
  5774.  
  5775.      Example:  MAXDIST=10 # re-enter lines if they get too far
  5776.  
  5777.      See Also: LLMIN, options
  5778.  
  5779.        _________________________________________________________________
  5780.  
  5781.  
  5782.  
  5783.  
  5784.  
  5785.  
  5786.  
  5787.  
  5788.  
  5789.  
  5790.  
  5791.  
  5792.  
  5793.  
  5794.  
  5795.  
  5796.  
  5797.  
  5798.  
  5799.  
  5800.  
  5801.  
  5802.  
  5803.  
  5804.  
  5805.        SKsh Amiga Shell            Page 88             Reference Manual
  5806.  
  5807.  
  5808.  
  5809.  
  5810.  
  5811.  
  5812.  
  5813.  
  5814.  
  5815.        _________________________________________________________________
  5816.  
  5817.      Name:     mem
  5818.  
  5819.      Type:     Builtin
  5820.  
  5821.      Default:  n/a
  5822.  
  5823.      Usage:    mem [ -tcf ]
  5824.  
  5825.      Range:    n/a
  5826.  
  5827.      About:    mem  reports the  amount  of  free  chip  and  fast
  5828.                memory, as well as a total.  If  the  't'  flag  is
  5829.                set,  only  the  total is printed.  If the  'c'  is
  5830.                set, only chip memory is listed,  and  if  the  'f'
  5831.                flag is set, only fast memory is listed.
  5832.  
  5833.      Example:  if [ $(mem -t) -lt 400000 ]
  5834.                then
  5835.                   echo 'you must have at least 400K free'
  5836.                fi
  5837.  
  5838.      See Also:
  5839.  
  5840.        _________________________________________________________________
  5841.  
  5842.  
  5843.  
  5844.  
  5845.  
  5846.  
  5847.  
  5848.  
  5849.  
  5850.  
  5851.  
  5852.  
  5853.  
  5854.  
  5855.  
  5856.  
  5857.  
  5858.  
  5859.  
  5860.  
  5861.  
  5862.  
  5863.  
  5864.  
  5865.  
  5866.  
  5867.  
  5868.  
  5869.  
  5870.  
  5871.        SKsh Amiga Shell            Page 89             Reference Manual
  5872.  
  5873.  
  5874.  
  5875.  
  5876.  
  5877.  
  5878.  
  5879.  
  5880.  
  5881.        _________________________________________________________________
  5882.  
  5883.      Name:     mkdir
  5884.  
  5885.      Type:     Builtin
  5886.  
  5887.      Default:  n/a
  5888.  
  5889.      Usage:    mkdir [ dirname ... ]
  5890.  
  5891.      Range:    n/a
  5892.  
  5893.      About:    mkdir  creates  directories with names identical to
  5894.                the parameters passed to it.
  5895.  
  5896.      Example:  mkdir my_dir sys:system/my_other_dir
  5897.  
  5898.      See Also: rmdir
  5899.  
  5900.        _________________________________________________________________
  5901.  
  5902.  
  5903.  
  5904.  
  5905.  
  5906.  
  5907.  
  5908.  
  5909.  
  5910.  
  5911.  
  5912.  
  5913.  
  5914.  
  5915.  
  5916.  
  5917.  
  5918.  
  5919.  
  5920.  
  5921.  
  5922.  
  5923.  
  5924.  
  5925.  
  5926.  
  5927.  
  5928.  
  5929.  
  5930.  
  5931.  
  5932.  
  5933.  
  5934.  
  5935.  
  5936.  
  5937.        SKsh Amiga Shell            Page 90             Reference Manual
  5938.  
  5939.  
  5940.  
  5941.  
  5942.  
  5943.  
  5944.  
  5945.  
  5946.  
  5947.        _________________________________________________________________
  5948.  
  5949.      Name:     mplist
  5950.  
  5951.      Type:     Builtin
  5952.  
  5953.      Default:  -l option
  5954.  
  5955.      Usage:    mplist [ -adrel ] [ name=name ... ]
  5956.  
  5957.      Range:    n/a
  5958.  
  5959.      About:    The  mplist (mount-point  list)  command provides a
  5960.                very  limited name  mapping facility.  For example,
  5961.                you might map "/df1" to "df1:", so  that  a  refer-
  5962.                ence to  the  file  "/df1/myfile" really references
  5963.                "df1:myfile".
  5964.  
  5965.                There are  currently many restrictions to this com-
  5966.                mand, and it is  intended as only a stopgap measure
  5967.                until  AmigaDos   supports  symbolic  links.    The
  5968.                mplist  command will not  work  operate nicely with
  5969.                file  completion,  and  the  entire  prefix must be
  5970.                given for the mapping to take place.
  5971.  
  5972.                Arguments  added  to  the  mplist are in  the  form
  5973.                "name=name", where the first  name  is  the  source
  5974.                for   the   mapping,   and   the   second  is   the
  5975.                destination.   All   arguments must  be  single  or
  5976.                double quoted.
  5977.  
  5978.                -a   Add  the  supplied  arguments to  the  mplist.
  5979.                     The  old  contents of the  list  are  left  in
  5980.                     place.
  5981.  
  5982.                -d   Delete   the   supplied   arguments  from  the
  5983.                     mplist.
  5984.  
  5985.                -r   Synonym for -d.
  5986.  
  5987.                -e   Empty the mplist.
  5988.  
  5989.                -l   List the  contents of the mplist, one name per
  5990.                     line.  If no  command line switches are given,
  5991.                     this is the default.
  5992.  
  5993.      Hints:    Please note the following:
  5994.  
  5995.                *    The  patterns  added  to  the  mplist must  be
  5996.                     single or double quoted.  
  5997.  
  5998.                *    The first part  of  mplist entry (before the =
  5999.                     sign)  must  match  a  portion of  a  filename
  6000.                     exactly.
  6001.  
  6002.  
  6003.        SKsh Amiga Shell            Page 91             Reference Manual
  6004.  
  6005.  
  6006.  
  6007.  
  6008.  
  6009.  
  6010.  
  6011.  
  6012.  
  6013.  
  6014.                *    The  mplist can be null if you don't  wish  to
  6015.                     use this feature.
  6016.  
  6017.                *    The  mplist can map any  unquoted  argument to
  6018.                     any string.  It does not have to be  used  for
  6019.                     directory names only.
  6020.  
  6021.  
  6022.      Example:  mplist -e     # empty the mplist
  6023.                # now map /usr/df0 to df0:, and /ram to ram:
  6024.                mplist -a '/usr/df0=df0:' '/ram=ram:'
  6025.  
  6026.                mplist -a 'd1=sys:usr/commands/src/directory-one'
  6027.                cd d1   # cd's to the above directory.
  6028.  
  6029.      See Also: CDPATH
  6030.  
  6031.        _________________________________________________________________
  6032.  
  6033.  
  6034.  
  6035.  
  6036.  
  6037.  
  6038.  
  6039.  
  6040.  
  6041.  
  6042.  
  6043.  
  6044.  
  6045.  
  6046.  
  6047.  
  6048.  
  6049.  
  6050.  
  6051.  
  6052.  
  6053.  
  6054.  
  6055.  
  6056.  
  6057.  
  6058.  
  6059.  
  6060.  
  6061.  
  6062.  
  6063.  
  6064.  
  6065.  
  6066.  
  6067.  
  6068.  
  6069.        SKsh Amiga Shell            Page 92             Reference Manual
  6070.  
  6071.  
  6072.  
  6073.  
  6074.  
  6075.  
  6076.  
  6077.  
  6078.  
  6079.        _________________________________________________________________
  6080.  
  6081.      Name:     mv
  6082.  
  6083.      Type:     Builtin
  6084.  
  6085.      Default:  n/a
  6086.  
  6087.      Usage:    mv [ -v ] source1 [ source2 ... ] destination
  6088.  
  6089.      Range:    n/a
  6090.  
  6091.      About:    mv  moves  files  or  directories by renaming them.
  6092.                Thus,  it   cannot  be  used  to  move  data  cross
  6093.                devices.  If more than one  source  is  given,  the
  6094.                destination  must  be  a  directory or nonexistant.
  6095.                If   it   is   nonexistant,  it  is  created  as  a
  6096.                directory.
  6097.  
  6098.                The  -v  option prints the name of each file as  it
  6099.                is moved.
  6100.  
  6101.                mv resets the archive bit of  all  files  which  it
  6102.                moves.
  6103.  
  6104.      Example:  mv my_dir sys:another_dir/my_other_dir
  6105.  
  6106.      See Also: cp
  6107.  
  6108.        _________________________________________________________________
  6109.  
  6110.  
  6111.  
  6112.  
  6113.  
  6114.  
  6115.  
  6116.  
  6117.  
  6118.  
  6119.  
  6120.  
  6121.  
  6122.  
  6123.  
  6124.  
  6125.  
  6126.  
  6127.  
  6128.  
  6129.  
  6130.  
  6131.  
  6132.  
  6133.  
  6134.  
  6135.        SKsh Amiga Shell            Page 93             Reference Manual
  6136.  
  6137.  
  6138.  
  6139.  
  6140.  
  6141.  
  6142.  
  6143.  
  6144.  
  6145.        _________________________________________________________________
  6146.  
  6147.      Name:     numloop/do/done
  6148.  
  6149.      Type:     Keywords
  6150.  
  6151.      Default:  n/a
  6152.  
  6153.      Usage:    numloop var = num1 num2 [ num3 ] do stmt_list done
  6154.  
  6155.      Range:    n/a
  6156.  
  6157.      About:    The  variable is set  to  num1  (which  must  be  a
  6158.                numeric value), and counts  through  num2  using  a
  6159.                step size of num3.  Num3 defaults to  1.   If  num3
  6160.                is positive, num2 must be greater  than  num1,  and
  6161.                vice verca.
  6162.  
  6163.                Infinite loops are not checked for.
  6164.  
  6165.      Example:  numloop a = 0 25 5
  6166.                do
  6167.                   echo $a
  6168.                done
  6169.  
  6170.      See Also: for, while
  6171.  
  6172.        _________________________________________________________________
  6173.  
  6174.  
  6175.  
  6176.  
  6177.  
  6178.  
  6179.  
  6180.  
  6181.  
  6182.  
  6183.  
  6184.  
  6185.  
  6186.  
  6187.  
  6188.  
  6189.  
  6190.  
  6191.  
  6192.  
  6193.  
  6194.  
  6195.  
  6196.  
  6197.  
  6198.  
  6199.  
  6200.  
  6201.        SKsh Amiga Shell            Page 94             Reference Manual
  6202.  
  6203.  
  6204.  
  6205.  
  6206.  
  6207.  
  6208.  
  6209.  
  6210.  
  6211.        _________________________________________________________________
  6212.  
  6213.      Name:     OLDPWD
  6214.  
  6215.      Type:     Variable
  6216.  
  6217.      Default:  old present working directory string
  6218.  
  6219.      Usage:    $OLDPWD
  6220.  
  6221.      Range:    n/a
  6222.  
  6223.      About:    When  the  present  working  directory is  changed,
  6224.                SKsh puts the old PWD value into OLDPWD.  The  cd -
  6225.                p command can be used to return to OLDPWD.
  6226.  
  6227.      Example:  echo $PWD; cd c:; echo $OLDPWD
  6228.  
  6229.      See Also: PWD, pwd, cd
  6230.  
  6231.        _________________________________________________________________
  6232.  
  6233.  
  6234.  
  6235.  
  6236.  
  6237.  
  6238.  
  6239.  
  6240.  
  6241.  
  6242.  
  6243.  
  6244.  
  6245.  
  6246.  
  6247.  
  6248.  
  6249.  
  6250.  
  6251.  
  6252.  
  6253.  
  6254.  
  6255.  
  6256.  
  6257.  
  6258.  
  6259.  
  6260.  
  6261.  
  6262.  
  6263.  
  6264.  
  6265.  
  6266.  
  6267.        SKsh Amiga Shell            Page 95             Reference Manual
  6268.  
  6269.  
  6270.  
  6271.  
  6272.  
  6273.  
  6274.  
  6275.  
  6276.  
  6277.        _________________________________________________________________
  6278.  
  6279.      Name:     options
  6280.  
  6281.      Type:     Builtin
  6282.  
  6283.      Default:  n/a
  6284.  
  6285.      Usage:    options [ -opts | +opts | opts ] ...
  6286.  
  6287.      Range:    n/a
  6288.  
  6289.      About:    The  options  command  provides a way to change the
  6290.                default  behavior of SKsh in a number of areas.  If
  6291.                the  command is  entered with no parameters, simply
  6292.                prints  the  current options string, which is a se-
  6293.                ries  of  letters and digits.   Otherwise, it exam-
  6294.                ines  each  parameter in turn.  Each  parameter can
  6295.                begin with a '+' or '-'; a '+' turns "on"  the  op-
  6296.                tions  corresponding  each  letter, and a '-' turns
  6297.                them "off".  In  addition, if neither '+' or '-' is
  6298.                present, the flags are set to the listed options.
  6299.  
  6300.                +1   Set  the  overstrike/insert mode back  to  the
  6301.                     default  value  after a return.  If this  flag
  6302.                     is  not  set,  the  overstrike/insert mode re-
  6303.                     mains set to what it was previously.
  6304.  
  6305.                +2   If set, try  to  execute AmigaDos 2.0 commands
  6306.                     using  "Runcommand".  This doesn't work  quite
  6307.                     right in Sksh 1.7, and the  flag  is  reset by
  6308.                     default.  It may be set by default later.
  6309.  
  6310.                +c   If  set,  SKsh  wildcard  expansion,  filename
  6311.                     completion, and a few other features  will  be
  6312.                     case independent.   If  unset,  they  will  be
  6313.                     case dependent.
  6314.  
  6315.                +e   If  set,  disable  command line editing.  This
  6316.                     might  be  useful for using SKsh from a termi-
  6317.                     nal that does not  support the ANSI escape se-
  6318.                     quences SKsh  uses  for  line  editing.   Note
  6319.                     that is flag is SET in  .skshinit.   You  must
  6320.                     reset it in .skshrc if you wish  to  use  line
  6321.                     editing (the .skshrc  file  supplied with SKsh
  6322.                     does this).
  6323.  
  6324.                +f   If set, disable wildcard filename expansion.
  6325.  
  6326.                +h   If  set,  always  create a  new  history line,
  6327.                     even  if  an  old  command  was  executed with
  6328.                     'history  -e'  or   the   interactive  editing
  6329.                     facility.   If  not  set,  executing old lines
  6330.                     will not create a new history entry.
  6331.  
  6332.  
  6333.        SKsh Amiga Shell            Page 96             Reference Manual
  6334.  
  6335.  
  6336.  
  6337.  
  6338.  
  6339.  
  6340.  
  6341.  
  6342.  
  6343.  
  6344.                +i   If set, use IFS to split $( )  command substi-
  6345.                     tution text, much  as  it  is  used  to  split
  6346.                     variable value expansion text.
  6347.  
  6348.                +l   If  set,  variables referenced in functions or
  6349.                     parenthetical  subshells  will  be  local (al-
  6350.                     though this  also  depends on the 'n' option).
  6351.                     If not set, there will be no  local variables.
  6352.                     Note  that  resetting this flag may have large
  6353.                     side   effects   when   running  scripts   and
  6354.                     functions.   The   advantage is that it  takes
  6355.                     less memory and is faster.
  6356.  
  6357.                +n   If set, only read scripts, but do not  execute
  6358.                     their commands.  This is  ignored for interac-
  6359.                     tive use.
  6360.  
  6361.                +p   If set,  use  the  exec  prompt  string  mode.
  6362.                     This tells sksh not to use the  prompt  string
  6363.                     as the prompt  directly, but rather to pass it
  6364.                     through  the  command  interpreter first,  and
  6365.                     use  the  results  as  the  prompt.   This  is
  6366.                     slower, but more powerful.
  6367.  
  6368.                +s   If   set,   sort   filename   parameters  from
  6369.                     wildcard expansion.
  6370.  
  6371.                +v   If  set,  variable  expansions  which  contain
  6372.                     wildcard  characters will use  those  wildcard
  6373.                     characters  in  filename  matching.   For  ex-
  6374.                     ample,  if  the  "foo"  variable contains "*",
  6375.                     then "echo $foo.bar" would echo any file  name
  6376.                     ending with ".bar".  If the v flag  is  RESET,
  6377.                     then  it  would  simply echo "*.bar"; ie,  the
  6378.                     value  of  the  variable would be  substituted
  6379.                     but ignored for filename matching.
  6380.  
  6381.                +w   If set, SKsh will  use  the  dwclist to selec-
  6382.                     tively  bypass  wildcard  file  expansion on a
  6383.                     command  by  command basis.   It  is  reset by
  6384.                     default.
  6385.  
  6386.                +x   If set, print each lines as  it  is  executed.
  6387.                     Moderately useful for debugging scripts.
  6388.  
  6389.                +C   Enable the  internal completion list.  See the
  6390.                     complist  command for details.  If  reset, the
  6391.                     internal completion list will be ignored.
  6392.  
  6393.  
  6394.  
  6395.  
  6396.  
  6397.  
  6398.  
  6399.        SKsh Amiga Shell            Page 97             Reference Manual
  6400.  
  6401.  
  6402.  
  6403.  
  6404.  
  6405.  
  6406.  
  6407.  
  6408.  
  6409.                +F   If set, map UNIX style filenames  to  AmigaDos
  6410.                     style  file  names.   A  leading '/' becomes a
  6411.                     ':',  a  '~'  inserts the contents of the HOME
  6412.                     variable,  a  '.'  becomes the  current direc-
  6413.                     tory, and two dots become a slash.
  6414.  
  6415.                +H   If set, lines executed with  history  -e  will
  6416.                     be printed before they are executed.
  6417.  
  6418.                +I   If set, leave out the .info files from  direc-
  6419.                     tory  listings  unless the 'i'  option to 'ls'
  6420.                     is explicitly set.
  6421.  
  6422.                +N   Create  new  variables in a  subshell or func-
  6423.                     tion  only  if  a  variable with the same name
  6424.                     does  not  exist in an outer context.  If  one
  6425.                     does  exist, that one will be used  instead of
  6426.                     making  a  new  local  variable.   This   flag
  6427.                     changes the scoping  rules,  and  can  have  a
  6428.                     large  effect in the  execution of scripts and
  6429.                     functions; it should be used with care.
  6430.  
  6431.                +O   Use  overstrike  instead of insert mode as the
  6432.                     default for command line editing.
  6433.  
  6434.                +P   If set,  ^r  history searches and 'history -e'
  6435.                     style  history  access will only  match  lines
  6436.                     beginning with the given  string.   If  unset,
  6437.                     the string  can  match  any  location within a
  6438.                     history line.
  6439.  
  6440.                +R   Disable  automatic  setting of LINES and  COL-
  6441.                     UMNS  variables.    Normally, these  variables
  6442.                     are  set  after the  window is re-sized at the
  6443.                     next  interactive prompt.  To set  them  manu-
  6444.                     ally and not  be  overridden by SKsh, use this
  6445.                     options flag.
  6446.  
  6447.                +S   Insert a single  blank  line  before and after
  6448.                     the     prompt     when     typing    commands
  6449.                     interactively.   For   interlace screens where
  6450.                     more than 36 or so lines are  displayed, using
  6451.                     the  S  option can  create a more visually ap-
  6452.                     pealing and "tidy" display.
  6453.  
  6454.                +U   The  U  option, if set, causes SKsh to  use  a
  6455.                     requester if a  component of the path contains
  6456.                     an  unmounted volume.  This also  affects sev-
  6457.                     eral  other  areas,  such  as  the  '-m'  test
  6458.                     expression.
  6459.  
  6460.  
  6461.  
  6462.  
  6463.  
  6464.  
  6465.        SKsh Amiga Shell            Page 98             Reference Manual
  6466.  
  6467.  
  6468.  
  6469.  
  6470.  
  6471.  
  6472.  
  6473.  
  6474.  
  6475.      Example:  # see which options are turned on:
  6476.                options
  6477.                # reset all options:
  6478.                options $(echo -c - '-' $(options))
  6479.  
  6480.      See Also:
  6481.  
  6482.        _________________________________________________________________
  6483.  
  6484.  
  6485.  
  6486.  
  6487.  
  6488.  
  6489.  
  6490.  
  6491.  
  6492.  
  6493.  
  6494.  
  6495.  
  6496.  
  6497.  
  6498.  
  6499.  
  6500.  
  6501.  
  6502.  
  6503.  
  6504.  
  6505.  
  6506.  
  6507.  
  6508.  
  6509.  
  6510.  
  6511.  
  6512.  
  6513.  
  6514.  
  6515.  
  6516.  
  6517.  
  6518.  
  6519.  
  6520.  
  6521.  
  6522.  
  6523.  
  6524.  
  6525.  
  6526.  
  6527.  
  6528.  
  6529.  
  6530.  
  6531.        SKsh Amiga Shell            Page 99             Reference Manual
  6532.  
  6533.  
  6534.  
  6535.  
  6536.  
  6537.  
  6538.  
  6539.  
  6540.  
  6541.        _________________________________________________________________
  6542.  
  6543.      Name:     OS_VER
  6544.  
  6545.      Type:     Variable
  6546.  
  6547.      Default:  n/a
  6548.  
  6549.      Usage:    $OS_VER
  6550.  
  6551.      Range:    n/a
  6552.  
  6553.      About:    This variable contains either the string  "1.3"  or
  6554.                the  string  "2.0",  depending  on  which  AmigaDos
  6555.                revision SKsh is being run under.
  6556.  
  6557.      Example:  if [ "$OS_VER" != '2.0' ]
  6558.                then
  6559.                   echo 'This script runs only under AmigaDos 2.0'
  6560.                   return 1
  6561.                fi
  6562.  
  6563.      See Also:
  6564.  
  6565.        _________________________________________________________________
  6566.  
  6567.  
  6568.  
  6569.  
  6570.  
  6571.  
  6572.  
  6573.  
  6574.  
  6575.  
  6576.  
  6577.  
  6578.  
  6579.  
  6580.  
  6581.  
  6582.  
  6583.  
  6584.  
  6585.  
  6586.  
  6587.  
  6588.  
  6589.  
  6590.  
  6591.  
  6592.  
  6593.  
  6594.  
  6595.  
  6596.  
  6597.        SKsh Amiga Shell            Page 100            Reference Manual
  6598.  
  6599.  
  6600.  
  6601.  
  6602.  
  6603.  
  6604.  
  6605.  
  6606.  
  6607.        _________________________________________________________________
  6608.  
  6609.      Name:     PAGER
  6610.  
  6611.      Type:     Variable
  6612.  
  6613.      Default:  Unset
  6614.  
  6615.      Usage:    $PAGER
  6616.  
  6617.      Range:    legal executable name
  6618.  
  6619.      About:    The  PAGER  variable is used by  the  man function.
  6620.                If set to an  AmigaDos  executable, that executable
  6621.                is used as  a  pager.   If  unset,  more is used by
  6622.                default.    PAGER should be set to a  command which
  6623.                does  not  exit  until you are  done  examining the
  6624.                file.   Any  command which detaches itself from the
  6625.                invoking process should not be used as a PAGER.
  6626.  
  6627.      Example:  PAGER=vi
  6628.                man file 
  6629.  
  6630.      See Also: man
  6631.  
  6632.        _________________________________________________________________
  6633.  
  6634.  
  6635.  
  6636.  
  6637.  
  6638.  
  6639.  
  6640.  
  6641.  
  6642.  
  6643.  
  6644.  
  6645.  
  6646.  
  6647.  
  6648.  
  6649.  
  6650.  
  6651.  
  6652.  
  6653.  
  6654.  
  6655.  
  6656.  
  6657.  
  6658.  
  6659.  
  6660.  
  6661.  
  6662.  
  6663.        SKsh Amiga Shell            Page 101            Reference Manual
  6664.  
  6665.  
  6666.  
  6667.  
  6668.  
  6669.  
  6670.  
  6671.  
  6672.  
  6673.        _________________________________________________________________
  6674.  
  6675.      Name:     PATH
  6676.  
  6677.      Type:     Variable
  6678.  
  6679.      Default:  'skshbin:,skshscr:,.,c:'
  6680.  
  6681.      Usage:    $PATH
  6682.  
  6683.      Range:    n/a
  6684.  
  6685.      About:    This  variable  contains a comma  separated list of
  6686.                directory  names.   When  SKsh  executes a file, it
  6687.                searches for it in these  directories.   Note  that
  6688.                the  current  working  directory must be  specified
  6689.                explicitly (".").  This lets you change  the  order
  6690.                of the search.  For  example, you could move "." to
  6691.                the end of the path to search it last.  The  direc-
  6692.                tory names in the path do not  need  to  be  termi-
  6693.                nated by a slash; SKsh will add one if  it  is  not
  6694.                there.
  6695.  
  6696.                If SKsh finds the file name  in  the  search  path,
  6697.                and the file has its script bit set, SKsh will  at-
  6698.                tempt  to  execute this file as a script instead of
  6699.                a binary.
  6700.  
  6701.                The  PATH  variable is also used by  the  which and
  6702.                whence commands.
  6703.  
  6704.                Entries in the  path  which  are  on  currently un-
  6705.                mounted  devices  are  bypassed silently,  although
  6706.                this behavior  can  be  changed  with  the  options
  6707.                command.
  6708.  
  6709.                The  PATH  variable should not be  modified explic-
  6710.                itly, but  rather,  though  the  use  of  the  path
  6711.                script, also described herein.
  6712.  
  6713.      Example:  c:run $(which emacs) my_file
  6714.  
  6715.      See Also: path, which, whence
  6716.  
  6717.        _________________________________________________________________
  6718.  
  6719.  
  6720.  
  6721.  
  6722.  
  6723.  
  6724.  
  6725.  
  6726.  
  6727.  
  6728.  
  6729.        SKsh Amiga Shell            Page 102            Reference Manual
  6730.  
  6731.  
  6732.  
  6733.  
  6734.  
  6735.  
  6736.  
  6737.  
  6738.  
  6739.        _________________________________________________________________
  6740.  
  6741.      Name:     path
  6742.  
  6743.      Type:     Function
  6744.  
  6745.      Default:  see the .skshinit file
  6746.  
  6747.      Usage:    path [ -cd | -path | -man ] [ -add ] dir1,dir2,...
  6748.  
  6749.      Range:    n/a
  6750.  
  6751.      About:    This   function  is  provided  to  make  the  PATH,
  6752.                MANPATH, and  CDPATH variables easier to set up and
  6753.                manipulate.
  6754.  
  6755.                With  no  arguments, path simply prints the current
  6756.                search path definition (but not the cd path).
  6757.  
  6758.                With  the  -cd  option and no other arguments, path
  6759.                prints  the  current cd path.  Similary,  the  -man
  6760.                option prints the man path.
  6761.  
  6762.                If given a set  of  directory names but no -add op-
  6763.                tion,  path sets  the  given  path  variable to the
  6764.                concatenation  of  the  values given.  No duplicate
  6765.                items will be added.  The search path  will  always
  6766.                contain the  skshbin:, skshscr:, c:, and . directo-
  6767.                ries so these need not be  added  separately.   The
  6768.                man path will always contain MAN: and MAN:SKsh.
  6769.  
  6770.                The  -add option may be used with or without the  -
  6771.                man  and  -cd options.  It causes each directory in
  6772.                the list to be added to the  appropriate path with-
  6773.                out  erasing the previous contents of the variable.
  6774.                Duplicate values will not be added.
  6775.  
  6776.                Each  directory argument can be either a single di-
  6777.                rectory or a comma separated list of directories.
  6778.  
  6779.      Example:  path -add sys:bin sys:pd/bin
  6780.                path -cd -add sys:usr,sys:mydir sys:anotherdir
  6781.                path -man -add MAN:subdir1
  6782.  
  6783.      See Also: PATH, CDPATH, MANPATH
  6784.  
  6785.        _________________________________________________________________
  6786.  
  6787.  
  6788.  
  6789.  
  6790.  
  6791.  
  6792.  
  6793.  
  6794.  
  6795.        SKsh Amiga Shell            Page 103            Reference Manual
  6796.  
  6797.  
  6798.  
  6799.  
  6800.  
  6801.  
  6802.  
  6803.  
  6804.  
  6805.        _________________________________________________________________
  6806.  
  6807.      Name:     pathconv
  6808.  
  6809.      Type:     Builtin
  6810.  
  6811.      Default:  n/a
  6812.  
  6813.      Usage:    pathconv [ -a | -u ] [ fspec ... ]
  6814.  
  6815.      Range:    n/a
  6816.  
  6817.      About:    pathconv  provides  a  mechanism   for   converting
  6818.                strings from AmigaDos  style  file  names  to  Unix
  6819.                style file names, and vice verca.
  6820.  
  6821.                The  -a  option  converts  filenames  to   AmigaDos
  6822.                style.  If neither -a nor -u is given,  -a  is  the
  6823.                default.
  6824.  
  6825.                The -u option converts filenames to Unix style.
  6826.  
  6827.                Note that  arguments  to  pathconv should be quoted
  6828.                to  avoid  being  changed  by  the  shell's  normal
  6829.                behavior.
  6830.  
  6831.      Example:  [prompt]: ROOT=sys:
  6832.                [prompt]: pathconv -a '/usr/bin/vi'
  6833.                   sys:usr/bin/vi
  6834.                [prompt]: pathconv -u 'sys:usr/bin/vi'
  6835.                   /usr/bin/vi
  6836.  
  6837.                [prompt]: pathconv -a '../../../myfile'
  6838.                   ///myfile
  6839.                [prompt]: pathconv -u '///myfile'
  6840.                   ../../../myfile
  6841.  
  6842.      Notes:    The +F option must be set for the  pathconv command
  6843.                to have any effect.  See the options command.
  6844.  
  6845.                The  exact  behavior  ofthe  pathconv  command will
  6846.                depend on several  variables,  including  ROOT  and
  6847.                HOME.
  6848.  
  6849.      See Also: options, ROOT
  6850.  
  6851.        _________________________________________________________________
  6852.  
  6853.  
  6854.  
  6855.  
  6856.  
  6857.  
  6858.  
  6859.  
  6860.  
  6861.        SKsh Amiga Shell            Page 104            Reference Manual
  6862.  
  6863.  
  6864.  
  6865.  
  6866.  
  6867.  
  6868.  
  6869.  
  6870.  
  6871.        _________________________________________________________________
  6872.  
  6873.      Name:     PNPC
  6874.  
  6875.      Type:     Variable
  6876.  
  6877.      Default:  61
  6878.  
  6879.      Usage:    $PNPC
  6880.  
  6881.      Range:    0 to 127
  6882.  
  6883.      About:    This  variable is  one  of  several responsible for
  6884.                controlling  the  actions of SKsh line  editing and
  6885.                display output.  PNPC  tells  SKsh  how  many  non-
  6886.                printing  control  characters there are in the cur-
  6887.                rently  defined prompt strings (both PS1 and  PS2).
  6888.                SKsh needs to know this so that  it  can  find  the
  6889.                actual  printing width of the  prompt  string  from
  6890.                the  actual  character length.  You will only  have
  6891.                to change PNPC if  you  change  the  number of ANSI
  6892.                control sequences in your prompt.
  6893.  
  6894.      Example:  PNPC=0
  6895.  
  6896.      See Also: COLUMNS, PS1, PS2, PNPC2, options
  6897.  
  6898.        _________________________________________________________________
  6899.  
  6900.  
  6901.  
  6902.  
  6903.  
  6904.  
  6905.  
  6906.  
  6907.  
  6908.  
  6909.  
  6910.  
  6911.  
  6912.  
  6913.  
  6914.  
  6915.  
  6916.  
  6917.  
  6918.  
  6919.  
  6920.  
  6921.  
  6922.  
  6923.  
  6924.  
  6925.  
  6926.  
  6927.        SKsh Amiga Shell            Page 105            Reference Manual
  6928.  
  6929.  
  6930.  
  6931.  
  6932.  
  6933.  
  6934.  
  6935.  
  6936.  
  6937.        _________________________________________________________________
  6938.  
  6939.      Name:     PNPC2
  6940.  
  6941.      Type:     Variable
  6942.  
  6943.      Default:  21
  6944.  
  6945.      Usage:    $PNPC2
  6946.  
  6947.      Range:    0 to 127
  6948.  
  6949.      About:    This  variable is similar to PNPC, but for the sec-
  6950.                ondary prompt string.  See PNPC for details.   Hav-
  6951.                ing  separate variables enables PS1 and PS2 to con-
  6952.                tain different numbers of escape sequences.
  6953.  
  6954.      Example:  PNPC2=0
  6955.  
  6956.      See Also: COLUMNS, PS1, PS2, PNPC, options
  6957.  
  6958.        _________________________________________________________________
  6959.  
  6960.  
  6961.  
  6962.  
  6963.  
  6964.  
  6965.  
  6966.  
  6967.  
  6968.  
  6969.  
  6970.  
  6971.  
  6972.  
  6973.  
  6974.  
  6975.  
  6976.  
  6977.  
  6978.  
  6979.  
  6980.  
  6981.  
  6982.  
  6983.  
  6984.  
  6985.  
  6986.  
  6987.  
  6988.  
  6989.  
  6990.  
  6991.  
  6992.  
  6993.        SKsh Amiga Shell            Page 106            Reference Manual
  6994.  
  6995.  
  6996.  
  6997.  
  6998.  
  6999.  
  7000.  
  7001.  
  7002.  
  7003.        _________________________________________________________________
  7004.  
  7005.      Name:     popd
  7006.  
  7007.      Type:     Script
  7008.  
  7009.      Default:  n/a
  7010.  
  7011.      Usage:    popd
  7012.  
  7013.      Range:    n/a
  7014.  
  7015.      About:    The  popd script pops the top directory off the di-
  7016.                rectory stack and  "cd"s  to  that  location.   The
  7017.                DIRSTACK  variable should never  be  modified manu-
  7018.                ally, but only  through  the  directory stack func-
  7019.                tions listed below.
  7020.  
  7021.      Example:  pushd sys:utilities    # push directory
  7022.                pushd ram:
  7023.                pushd sys:system
  7024.                popd                   # back to ram:
  7025.                popd                   # back to sys:utilities
  7026.                popd                   # back to previous dir
  7027.  
  7028.      See Also: pushd, dstack, cleard, DIRSTACK
  7029.  
  7030.        _________________________________________________________________
  7031.  
  7032.  
  7033.  
  7034.  
  7035.  
  7036.  
  7037.  
  7038.  
  7039.  
  7040.  
  7041.  
  7042.  
  7043.  
  7044.  
  7045.  
  7046.  
  7047.  
  7048.  
  7049.  
  7050.  
  7051.  
  7052.  
  7053.  
  7054.  
  7055.  
  7056.  
  7057.  
  7058.  
  7059.        SKsh Amiga Shell            Page 107            Reference Manual
  7060.  
  7061.  
  7062.  
  7063.  
  7064.  
  7065.  
  7066.  
  7067.  
  7068.  
  7069.        _________________________________________________________________
  7070.  
  7071.      Name:     preparse
  7072.  
  7073.      Type:     Builtin
  7074.  
  7075.      Default:  n/a
  7076.  
  7077.      Usage:    preparse < infile > outfile
  7078.  
  7079.      Range:    n/a
  7080.  
  7081.      About:    preparse reads  a  legal SKsh script from its stan-
  7082.                dard  input and  produces a "preparsed" file on its
  7083.                standard output.  This preparsed file can  then  be
  7084.                read back into SKsh much  (2  to  3  times)  faster
  7085.                than  a  normal SKsh script  file.   The  preparsed
  7086.                file acts just like a script file; if  it  has  its
  7087.                script bit set, it  can  be  automatically executed
  7088.                by  typing its name.  It can also be sourced.  How-
  7089.                ever, it is not in a human readable format.
  7090.  
  7091.                SKsh  guarantees that script files will be upwardly
  7092.                compatible   between  versions  of  SKsh;  however,
  7093.                preparsed  files  will  not  be.    Therefore,  the
  7094.                source scripts must be retained.
  7095.  
  7096.                SKsh  will  automatically detect preparsed versions
  7097.                of  the  .skshinit  and   .skshrc   files   (called
  7098.                .skshinit.pp and .skshrc.pp) and use those if  they
  7099.                exist.  This  can  dramatically reduce SKsh invoca-
  7100.                tion time.
  7101.  
  7102.                SKsh will  issue an error message if you try to ex-
  7103.                ecute a  preparsed  file  from  an  old  version of
  7104.                SKsh.
  7105.  
  7106.                Preparsing files  will  probably make a significant
  7107.                difference only if the file is later  read  from  a
  7108.                hard disk or a ram drive.  From a floppy, SKsh  can
  7109.                parse the file nearly as fast  as  the  floppy  can
  7110.                read it.
  7111.  
  7112.      Example:  preparse < Stuff.sksh > Stuff.sksh.pp
  7113.  
  7114.      See Also: Addendum1.5.doc for an example  of  how  to  source
  7115.                other preparesed files from your .skshrc file.
  7116.  
  7117.        _________________________________________________________________
  7118.  
  7119.  
  7120.  
  7121.  
  7122.  
  7123.  
  7124.  
  7125.        SKsh Amiga Shell            Page 108            Reference Manual
  7126.  
  7127.  
  7128.  
  7129.  
  7130.  
  7131.  
  7132.  
  7133.  
  7134.  
  7135.        _________________________________________________________________
  7136.  
  7137.      Name:     printf
  7138.  
  7139.      Type:     Builtin
  7140.  
  7141.      Default:  n/a
  7142.  
  7143.      Usage:    printf formatstring parameters...
  7144.  
  7145.      Range:    n/a
  7146.  
  7147.      About:    printf  is  similar to the  C  function of the same
  7148.                name.  The  first  parameters is the format string,
  7149.                and  the  rest  are  inserted appropriately.   Note
  7150.                that there  are  no  associated fprintf and sprintf
  7151.                functions,  as  those  can  be  easily accomplished
  7152.                with "var=$(printf)" or "printf >>file".
  7153.  
  7154.                The  echo  statement should be used when no format-
  7155.                ting is needed.
  7156.  
  7157.      Notes:    To print  integers, "%ld" should always be used in-
  7158.                stead of "%d".
  7159.  
  7160.                The  "%c"  option does not  work.   Instead, use %s
  7161.                with a one character string.
  7162.  
  7163.                Any  argument beginning with "-" or a digit will be
  7164.                converted to a 32  bit  integer before being passed
  7165.                to printf.   This  is  necessary as SKsh stores all
  7166.                values  internally as strings.  If you wish to  use
  7167.                such  a  parameter with the "%s"  format, prefix it
  7168.                with a leading space.
  7169.  
  7170.                The  result string must fit within one  SKsh  token
  7171.                (1023  characters).  SKsh does not check for  over-
  7172.                flow, so it would be advisable to heed this limit.
  7173.  
  7174.      Example:  printf "Test: %10s %5ld" FOO 42
  7175.  
  7176.      See Also: echo
  7177.  
  7178.        _________________________________________________________________
  7179.  
  7180.  
  7181.  
  7182.  
  7183.  
  7184.  
  7185.  
  7186.  
  7187.  
  7188.  
  7189.  
  7190.  
  7191.        SKsh Amiga Shell            Page 109            Reference Manual
  7192.  
  7193.  
  7194.  
  7195.  
  7196.  
  7197.  
  7198.  
  7199.  
  7200.  
  7201.        _________________________________________________________________
  7202.  
  7203.      Name:     ps
  7204.  
  7205.      Type:     Builtin
  7206.  
  7207.      Default:  n/a
  7208.  
  7209.      Usage:    ps
  7210.  
  7211.      Range:    n/a
  7212.  
  7213.      About:    ps prints, for each  CLI  process, the process num-
  7214.                ber,  the  address of the  process, the priority of
  7215.                the  process, the  command name associated with the
  7216.                process, and the  current working directory for the
  7217.                process.
  7218.  
  7219.      Example:  ps
  7220.  
  7221.      See Also:
  7222.  
  7223.        _________________________________________________________________
  7224.  
  7225.  
  7226.  
  7227.  
  7228.  
  7229.  
  7230.  
  7231.  
  7232.  
  7233.  
  7234.  
  7235.  
  7236.  
  7237.  
  7238.  
  7239.  
  7240.  
  7241.  
  7242.  
  7243.  
  7244.  
  7245.  
  7246.  
  7247.  
  7248.  
  7249.  
  7250.  
  7251.  
  7252.  
  7253.  
  7254.  
  7255.  
  7256.  
  7257.        SKsh Amiga Shell            Page 110            Reference Manual
  7258.  
  7259.  
  7260.  
  7261.  
  7262.  
  7263.  
  7264.  
  7265.  
  7266.  
  7267.        _________________________________________________________________
  7268.  
  7269.      Name:     PS1
  7270.  
  7271.      Type:     Variable
  7272.  
  7273.      Default:  $_ANSI_P3[$_ANSI_P2$CLINUM$_ANSI_P3|$_ANSI_P2\
  7274.                $CMDNUM$_ANSI_P3|$PWD]: $_ANSI_P1
  7275.  
  7276.      Usage:    $PS1
  7277.  
  7278.      Range:    n/a
  7279.  
  7280.      About:    This  variable  controls the  primary prompt string
  7281.                displayed by SKsh.  If the 'p'  SKsh  option is not
  7282.                set  (see  options), SKsh  expands the variables in
  7283.                the string,  and  outputs it as the primary prompt.
  7284.                For this  reason, PS1 should be defined to a single
  7285.                quoted string, so that  the  variables are expanded
  7286.                at the proper time and not when PS1 is defined.
  7287.  
  7288.                If  the  'p'  option to SKsh is set, SKsh sends the
  7289.                contents of  the  PS1  variable through the command
  7290.                interpreter,  and  displays the  result as the pri-
  7291.                mary prompt.  In this case,  PS1  should  contain a
  7292.                string which when  executed, will print the desired
  7293.                prompt.  This is  slower  than  the  default method
  7294.                above.
  7295.  
  7296.      Example:  PS1='$ '; PNPC=0
  7297.  
  7298.      See Also: PS2, PNPC, options
  7299.  
  7300.        _________________________________________________________________
  7301.  
  7302.  
  7303.  
  7304.  
  7305.  
  7306.  
  7307.  
  7308.  
  7309.  
  7310.  
  7311.  
  7312.  
  7313.  
  7314.  
  7315.  
  7316.  
  7317.  
  7318.  
  7319.  
  7320.  
  7321.  
  7322.  
  7323.        SKsh Amiga Shell            Page 111            Reference Manual
  7324.  
  7325.  
  7326.  
  7327.  
  7328.  
  7329.  
  7330.  
  7331.  
  7332.  
  7333.        _________________________________________________________________
  7334.  
  7335.      Name:     PS2
  7336.  
  7337.      Type:     Variable
  7338.  
  7339.      Default:  '$_ANSI_P3> $_ANSI_P1'
  7340.  
  7341.      Usage:    $PS2
  7342.  
  7343.      Range:    n/a
  7344.  
  7345.      About:    This  variable controls the secondary prompt string
  7346.                displayed by SKsh.  This is the prompt string  dis-
  7347.                played  when  SKsh  expects more input, such as the
  7348.                continuation  of  a  for  statement or unterminated
  7349.                string.
  7350.  
  7351.                If the  'p'  SKsh  option is not set (see options),
  7352.                SKsh  expands the variables in the string, and out-
  7353.                puts it as the  secondary prompt.  For this reason,
  7354.                PS2  should  be  defined to a single quoted string,
  7355.                so  that  the  variables are expanded at the proper
  7356.                time and not when PS2 is defined.
  7357.  
  7358.                If  the  'p'  option to SKsh is set, SKsh sends the
  7359.                contents of  the  PS2  variable through the command
  7360.                interpreter,  and  displays the  result as the sec-
  7361.                ondary prompt.  In this case, PS2 should  contain a
  7362.                string which when  executed, will print the desired
  7363.                prompt.  This is  slower  than  the  default method
  7364.                above.
  7365.  
  7366.      Example:  PS2=': '; PNPC=0
  7367.  
  7368.      See Also: PS1, PNPC, options
  7369.  
  7370.        _________________________________________________________________
  7371.  
  7372.  
  7373.  
  7374.  
  7375.  
  7376.  
  7377.  
  7378.  
  7379.  
  7380.  
  7381.  
  7382.  
  7383.  
  7384.  
  7385.  
  7386.  
  7387.  
  7388.  
  7389.        SKsh Amiga Shell            Page 112            Reference Manual
  7390.  
  7391.  
  7392.  
  7393.  
  7394.  
  7395.  
  7396.  
  7397.  
  7398.  
  7399.        _________________________________________________________________
  7400.  
  7401.      Name:     pushd
  7402.  
  7403.      Type:     Script
  7404.  
  7405.      Default:  n/a
  7406.  
  7407.      Usage:    pushd new_dir
  7408.  
  7409.      Range:    n/a
  7410.  
  7411.      About:    The  pushd script "cd"s to new_dir and  pushes  the
  7412.                old  directory on the  director stack for later re-
  7413.                trieval with  the  popd script.  The DIRSTACK vari-
  7414.                able should  never  be  modified manually, but only
  7415.                through   the   directory  stack  functions  listed
  7416.                below.
  7417.  
  7418.      Example:  pushd sys:utilities    # push directory
  7419.                pushd ram:
  7420.                pushd sys:system
  7421.                popd                   # back to ram:
  7422.                popd                   # back to sys:utilities
  7423.                popd                   # back to previous dir
  7424.  
  7425.      See Also: popd, dstack, cleard, DIRSTACK
  7426.  
  7427.        _________________________________________________________________
  7428.  
  7429.  
  7430.  
  7431.  
  7432.  
  7433.  
  7434.  
  7435.  
  7436.  
  7437.  
  7438.  
  7439.  
  7440.  
  7441.  
  7442.  
  7443.  
  7444.  
  7445.  
  7446.  
  7447.  
  7448.  
  7449.  
  7450.  
  7451.  
  7452.  
  7453.  
  7454.  
  7455.        SKsh Amiga Shell            Page 113            Reference Manual
  7456.  
  7457.  
  7458.  
  7459.  
  7460.  
  7461.  
  7462.  
  7463.  
  7464.  
  7465.        _________________________________________________________________
  7466.  
  7467.      Name:     PWD
  7468.  
  7469.      Type:     Variable
  7470.  
  7471.      Default:  present working directory string
  7472.  
  7473.      Usage:    $PWD
  7474.  
  7475.      Range:    n/a
  7476.  
  7477.      About:    SKsh  maintains the  contents of this variable such
  7478.                that  it  always  represents  the  current  working
  7479.                directory.
  7480.  
  7481.      Example:  old_dir="$PWD";    # save old directory
  7482.  
  7483.      See Also: OLDPWD, BPWD, pwd, cd
  7484.  
  7485.        _________________________________________________________________
  7486.  
  7487.  
  7488.  
  7489.  
  7490.  
  7491.  
  7492.  
  7493.  
  7494.  
  7495.  
  7496.  
  7497.  
  7498.  
  7499.  
  7500.  
  7501.  
  7502.  
  7503.  
  7504.  
  7505.  
  7506.  
  7507.  
  7508.  
  7509.  
  7510.  
  7511.  
  7512.  
  7513.  
  7514.  
  7515.  
  7516.  
  7517.  
  7518.  
  7519.  
  7520.  
  7521.        SKsh Amiga Shell            Page 114            Reference Manual
  7522.  
  7523.  
  7524.  
  7525.  
  7526.  
  7527.  
  7528.  
  7529.  
  7530.  
  7531.        _________________________________________________________________
  7532.  
  7533.      Name:     pwd
  7534.  
  7535.      Type:     Alias
  7536.  
  7537.      Default:  echo "$PWD"
  7538.  
  7539.      Usage:    pwd
  7540.  
  7541.      Range:    n/a
  7542.  
  7543.      About:    This  alias  simply prints the present  working di-
  7544.                rectory string.
  7545.  
  7546.      Example:  pwd
  7547.  
  7548.      See Also: PWD, OLDPWD
  7549.  
  7550.        _________________________________________________________________
  7551.  
  7552.  
  7553.  
  7554.  
  7555.  
  7556.  
  7557.  
  7558.  
  7559.  
  7560.  
  7561.  
  7562.  
  7563.  
  7564.  
  7565.  
  7566.  
  7567.  
  7568.  
  7569.  
  7570.  
  7571.  
  7572.  
  7573.  
  7574.  
  7575.  
  7576.  
  7577.  
  7578.  
  7579.  
  7580.  
  7581.  
  7582.  
  7583.  
  7584.  
  7585.  
  7586.  
  7587.        SKsh Amiga Shell            Page 115            Reference Manual
  7588.  
  7589.  
  7590.  
  7591.  
  7592.  
  7593.  
  7594.  
  7595.  
  7596.  
  7597.        _________________________________________________________________
  7598.  
  7599.      Name:     qrm
  7600.  
  7601.      Type:     Script
  7602.  
  7603.      Default:  n/a
  7604.  
  7605.      Usage:    pwd
  7606.  
  7607.      Range:    n/a
  7608.  
  7609.      About:    qrm is like  the  rm function, but before each file
  7610.                it prompts for whether the file should be deleted.
  7611.  
  7612.      Example:  qrm *.o
  7613.  
  7614.      See Also: rm
  7615.  
  7616.        _________________________________________________________________
  7617.  
  7618.  
  7619.  
  7620.  
  7621.  
  7622.  
  7623.  
  7624.  
  7625.  
  7626.  
  7627.  
  7628.  
  7629.  
  7630.  
  7631.  
  7632.  
  7633.  
  7634.  
  7635.  
  7636.  
  7637.  
  7638.  
  7639.  
  7640.  
  7641.  
  7642.  
  7643.  
  7644.  
  7645.  
  7646.  
  7647.  
  7648.  
  7649.  
  7650.  
  7651.  
  7652.  
  7653.        SKsh Amiga Shell            Page 116            Reference Manual
  7654.  
  7655.  
  7656.  
  7657.  
  7658.  
  7659.  
  7660.  
  7661.  
  7662.  
  7663.        _________________________________________________________________
  7664.  
  7665.      Name:     quit
  7666.  
  7667.      Type:     Alias
  7668.  
  7669.      Default:  LOGOUT=""; exit
  7670.  
  7671.      Usage:    pwd
  7672.  
  7673.      Range:    n/a
  7674.  
  7675.      About:    quit  is  like  exit but does not execute the value
  7676.                of the LOGOUT variable first.
  7677.  
  7678.      Example:  pwd
  7679.  
  7680.      See Also: exit, logout, LOGOUT
  7681.  
  7682.        _________________________________________________________________
  7683.  
  7684.  
  7685.  
  7686.  
  7687.  
  7688.  
  7689.  
  7690.  
  7691.  
  7692.  
  7693.  
  7694.  
  7695.  
  7696.  
  7697.  
  7698.  
  7699.  
  7700.  
  7701.  
  7702.  
  7703.  
  7704.  
  7705.  
  7706.  
  7707.  
  7708.  
  7709.  
  7710.  
  7711.  
  7712.  
  7713.  
  7714.  
  7715.  
  7716.  
  7717.  
  7718.  
  7719.        SKsh Amiga Shell            Page 117            Reference Manual
  7720.  
  7721.  
  7722.  
  7723.  
  7724.  
  7725.  
  7726.  
  7727.  
  7728.  
  7729.        _________________________________________________________________
  7730.  
  7731.      Name:     read
  7732.  
  7733.      Type:     Builtin
  7734.  
  7735.      Default:  n/a
  7736.  
  7737.      Usage:    read var
  7738.  
  7739.      Range:    n/a
  7740.  
  7741.      About:    The  read command sets the value of the variable by
  7742.                reading  exactly  one  command  from  the  standard
  7743.                input.  This can be used  to  accept input from the
  7744.                keyboard, or it can  have  its  own  standard input
  7745.                redirected to read lines from  a  file.   Read  re-
  7746.                turns a non-zero  return code when it encounters an
  7747.                end-of-file; this is useful in loops.
  7748.  
  7749.      Example:  while read in_line
  7750.                do
  7751.                   echo "We read: $in_line"
  7752.                done < my_input_file.txt
  7753.  
  7754.      See Also: line
  7755.  
  7756.        _________________________________________________________________
  7757.  
  7758.  
  7759.  
  7760.  
  7761.  
  7762.  
  7763.  
  7764.  
  7765.  
  7766.  
  7767.  
  7768.  
  7769.  
  7770.  
  7771.  
  7772.  
  7773.  
  7774.  
  7775.  
  7776.  
  7777.  
  7778.  
  7779.  
  7780.  
  7781.  
  7782.  
  7783.  
  7784.  
  7785.        SKsh Amiga Shell            Page 118            Reference Manual
  7786.  
  7787.  
  7788.  
  7789.  
  7790.  
  7791.  
  7792.  
  7793.  
  7794.  
  7795.        _________________________________________________________________
  7796.  
  7797.      Name:     RECUR_DEPTH
  7798.  
  7799.      Type:     Variable
  7800.  
  7801.      Default:  16
  7802.  
  7803.      Usage:    $RECUR_DEPTH
  7804.  
  7805.      Range:    12 <= RECUR_DEPTH <= 128
  7806.  
  7807.      About:    This  variable  is  set  to  the  maximum number of
  7808.                times that the SKsh parser will  recurse before is-
  7809.                suing  an  error message.  The  default is probably
  7810.                fine  for  most  applications, but to  deeply  nest
  7811.                scripts  or  functions you may have to increase the
  7812.                number.    Complex test statements or large numbers
  7813.                of  connected '&&' and '||' clauses may  also  need
  7814.                larger recursion depths.
  7815.  
  7816.                If  you  increase this beyond the default, you will
  7817.                also need to increase the stack size.
  7818.  
  7819.      Example:  RECUR_DEPTH=32; 
  7820.  
  7821.      See Also:
  7822.  
  7823.        _________________________________________________________________
  7824.  
  7825.  
  7826.  
  7827.  
  7828.  
  7829.  
  7830.  
  7831.  
  7832.  
  7833.  
  7834.  
  7835.  
  7836.  
  7837.  
  7838.  
  7839.  
  7840.  
  7841.  
  7842.  
  7843.  
  7844.  
  7845.  
  7846.  
  7847.  
  7848.  
  7849.  
  7850.  
  7851.        SKsh Amiga Shell            Page 119            Reference Manual
  7852.  
  7853.  
  7854.  
  7855.  
  7856.  
  7857.  
  7858.  
  7859.  
  7860.  
  7861.        _________________________________________________________________
  7862.  
  7863.      Name:     resident
  7864.  
  7865.      Type:     Builtin
  7866.  
  7867.      Default:  n/a
  7868.  
  7869.      Usage:    resident [ -l ]
  7870.                resident [ -a | -d ] [ progname ... ]
  7871.  
  7872.      Range:    n/a
  7873.  
  7874.      About:    The  resident  command can be used  to  examine the
  7875.                resident list,  add  programs to it, or delete pro-
  7876.                grams  from  it.    "resident" with no arguments or
  7877.                with the "-l" flag lists the  programs currently on
  7878.                the  resident list.  The -a  flag  adds  the  named
  7879.                programs  to  the  resident list; the whole path to
  7880.                the file must be given,  although only the basename
  7881.                is  remembered.   Resident -d deletes programs from
  7882.                the resident list.
  7883.  
  7884.      Example:  resident -a /bin/view   # add view to res list
  7885.                resident -l             # list resident list
  7886.  
  7887.      See Also: which
  7888.  
  7889.        _________________________________________________________________
  7890.  
  7891.  
  7892.  
  7893.  
  7894.  
  7895.  
  7896.  
  7897.  
  7898.  
  7899.  
  7900.  
  7901.  
  7902.  
  7903.  
  7904.  
  7905.  
  7906.  
  7907.  
  7908.  
  7909.  
  7910.  
  7911.  
  7912.  
  7913.  
  7914.  
  7915.  
  7916.  
  7917.        SKsh Amiga Shell            Page 120            Reference Manual
  7918.  
  7919.  
  7920.  
  7921.  
  7922.  
  7923.  
  7924.  
  7925.  
  7926.  
  7927.        _________________________________________________________________
  7928.  
  7929.      Name:     return
  7930.  
  7931.      Type:     Builtin
  7932.  
  7933.      Default:  n/a
  7934.  
  7935.      Usage:    return [ code ] [ level ]
  7936.  
  7937.      Range:    n/a
  7938.  
  7939.      About:    The  return command exits from an enclosing script,
  7940.                subshell, or function with exit code <code>  (0  by
  7941.                default).  An optional second argument will  return
  7942.                from <level> nested levels of  scripts,  subshells,
  7943.                or functions.
  7944.  
  7945.      Example:  ( echo foo; return; echo 'This is not echoed' )
  7946.  
  7947.      See Also: continue, break
  7948.  
  7949.        _________________________________________________________________
  7950.  
  7951.  
  7952.  
  7953.  
  7954.  
  7955.  
  7956.  
  7957.  
  7958.  
  7959.  
  7960.  
  7961.  
  7962.  
  7963.  
  7964.  
  7965.  
  7966.  
  7967.  
  7968.  
  7969.  
  7970.  
  7971.  
  7972.  
  7973.  
  7974.  
  7975.  
  7976.  
  7977.  
  7978.  
  7979.  
  7980.  
  7981.  
  7982.  
  7983.        SKsh Amiga Shell            Page 121            Reference Manual
  7984.  
  7985.  
  7986.  
  7987.  
  7988.  
  7989.  
  7990.  
  7991.  
  7992.  
  7993.        _________________________________________________________________
  7994.  
  7995.      Name:     rm
  7996.  
  7997.      Type:     Builtin
  7998.  
  7999.      Default:  n/a
  8000.  
  8001.      Usage:    rm [ -rvf ] [ file | dir ] ...
  8002.  
  8003.      Range:    n/a
  8004.  
  8005.      About:    This  command  simply  removes the named files.  It
  8006.                will  not  remove  directories unless the '-r' flag
  8007.                is  used;  use  rmdir  to  remove a  single,  empty
  8008.                directory.
  8009.  
  8010.                The '-r' flag  causes  'rm'  to  recursively remove
  8011.                everything  under each directory.  This is somewhat
  8012.                dangerous; care should be used.
  8013.  
  8014.                The '-v' flag prints the name of each  file  as  it
  8015.                is removed.
  8016.  
  8017.                The '-f' flag will perform a "chmod  +wd"  on  each
  8018.                file or directory before deletion.
  8019.  
  8020.      Example:  rm scrap_file.c
  8021.  
  8022.      See Also: rmdir
  8023.  
  8024.        _________________________________________________________________
  8025.  
  8026.  
  8027.  
  8028.  
  8029.  
  8030.  
  8031.  
  8032.  
  8033.  
  8034.  
  8035.  
  8036.  
  8037.  
  8038.  
  8039.  
  8040.  
  8041.  
  8042.  
  8043.  
  8044.  
  8045.  
  8046.  
  8047.  
  8048.  
  8049.        SKsh Amiga Shell            Page 122            Reference Manual
  8050.  
  8051.  
  8052.  
  8053.  
  8054.  
  8055.  
  8056.  
  8057.  
  8058.  
  8059.        _________________________________________________________________
  8060.  
  8061.      Name:     rmdir
  8062.  
  8063.      Type:     Builtin
  8064.  
  8065.      Default:  n/a
  8066.  
  8067.      Usage:    rmdir [ dir ... ]
  8068.  
  8069.      Range:    n/a
  8070.  
  8071.      About:    This  command simply removes the named directories.
  8072.                It will  not  remove files or directories which are
  8073.                not empty.
  8074.  
  8075.      Example:  rmdir scrap_dir
  8076.  
  8077.      See Also: rmdir
  8078.  
  8079.        _________________________________________________________________
  8080.  
  8081.  
  8082.  
  8083.  
  8084.  
  8085.  
  8086.  
  8087.  
  8088.  
  8089.  
  8090.  
  8091.  
  8092.  
  8093.  
  8094.  
  8095.  
  8096.  
  8097.  
  8098.  
  8099.  
  8100.  
  8101.  
  8102.  
  8103.  
  8104.  
  8105.  
  8106.  
  8107.  
  8108.  
  8109.  
  8110.  
  8111.  
  8112.  
  8113.  
  8114.  
  8115.        SKsh Amiga Shell            Page 123            Reference Manual
  8116.  
  8117.  
  8118.  
  8119.  
  8120.  
  8121.  
  8122.  
  8123.  
  8124.  
  8125.        _________________________________________________________________
  8126.  
  8127.      Name:     ROOT
  8128.  
  8129.      Type:     Variable
  8130.  
  8131.      Default:  ":"
  8132.  
  8133.      Usage:    path names beginning with '/'
  8134.  
  8135.      Range:    Any legal directory or filesystem device name
  8136.  
  8137.      About:    When  Un*x  filename  mapping is used (see the  op-
  8138.                tions  command), SKsh replaces a leading slash with
  8139.                the  contents of this variable.  It  is  normally a
  8140.                colon, which makes the  path  name  become relative
  8141.                to the "root" of  the  current device.  However, it
  8142.                can be set  to  any  directory or filesystem device
  8143.                name.   For   example, if set to "sys:",  all  file
  8144.                references  beginning  with  a  slash  will  become
  8145.                relative to 'sys:',  even  if  the  current working
  8146.                directory  is  on  another device.  If can also  be
  8147.                set to a subdirectory  of  a  device, as in the ex-
  8148.                ample  below, in which case  it  must  end  with  a
  8149.                slash.
  8150.  
  8151.      Example:  ROOT=sys:usr/work/    # make this the new "root"
  8152.  
  8153.      See Also: options
  8154.  
  8155.        _________________________________________________________________
  8156.  
  8157.  
  8158.  
  8159.  
  8160.  
  8161.  
  8162.  
  8163.  
  8164.  
  8165.  
  8166.  
  8167.  
  8168.  
  8169.  
  8170.  
  8171.  
  8172.  
  8173.  
  8174.  
  8175.  
  8176.  
  8177.  
  8178.  
  8179.  
  8180.  
  8181.        SKsh Amiga Shell            Page 124            Reference Manual
  8182.  
  8183.  
  8184.  
  8185.  
  8186.  
  8187.  
  8188.  
  8189.  
  8190.  
  8191.        _________________________________________________________________
  8192.  
  8193.      Name:     set
  8194.  
  8195.      Type:     Builtin
  8196.  
  8197.      Default:  n/a
  8198.  
  8199.      Usage:    set [ -tfabvs ] [ pattern ... ]
  8200.  
  8201.      Range:    n/a
  8202.  
  8203.      About:    With  no  options,  set lists each variable and its
  8204.                definition.   If   pattern  arguments, each one  is
  8205.                listed.  The  'f'  options forces interpretation as
  8206.                function names, the 'a'  option as alias names, the
  8207.                'b'  option  as  builtin command names, and the 'v'
  8208.                option as variables names (the default).
  8209.  
  8210.                The 's'  option leaves out the definition, printing
  8211.                only the name on  a  single  line.   In  any  case,
  8212.                function  definitions are not listed in  this  ver-
  8213.                sion of SKsh.  If the  's'  option is used, the 'v'
  8214.                option  must  explicitly be set to list  variables.
  8215.                Also, more than one of 'f', 'a', 'b', and  'v'  may
  8216.                be set.
  8217.  
  8218.                SKsh will not  list  any  function, alias, builtin,
  8219.                or  variable whose  name  begins with an underscore
  8220.                (hidden  variables, etc).  This is useful to either
  8221.                hide  definitions  from  users, or in  cases  where
  8222.                printing  the  contents of a variable would corrupt
  8223.                the display (such as the _ANSI_CLEAR variable).
  8224.  
  8225.                The  definition of builtin commands is printed as a
  8226.                short description of the command.
  8227.  
  8228.                The  set  command  cannot be used to set variables,
  8229.                as  in  csh.  Use the assignment operator ('=') for
  8230.                that.
  8231.  
  8232.                The  -t  option causes  the  set command to use the
  8233.                top  level  symbol table to find definitions.  This
  8234.                is useful with the shared SKsh modes.
  8235.  
  8236.      Example:  set -b '[a-d]*'
  8237.  
  8238.      See Also: unset
  8239.  
  8240.        _________________________________________________________________
  8241.  
  8242.  
  8243.  
  8244.  
  8245.  
  8246.  
  8247.        SKsh Amiga Shell            Page 125            Reference Manual
  8248.  
  8249.  
  8250.  
  8251.  
  8252.  
  8253.  
  8254.  
  8255.  
  8256.  
  8257.        _________________________________________________________________
  8258.  
  8259.      Name:     setmap
  8260.  
  8261.      Type:     Builtin
  8262.  
  8263.      Default:  n/a
  8264.  
  8265.      Usage:    setmap -r
  8266.                setmap -s map [{key|code} {fn|"@map"|"!macro"}]...
  8267.                setmap -n mapnum ...
  8268.                setmap -e exitmap mapnum ...
  8269.                setmap -m macronum [ fn | string ] ...
  8270.  
  8271.      Range:    32 definable key maps ( 0 to 31)
  8272.                256 entries per key map
  8273.                32 definable key macros ( 0 to 31 )
  8274.                64 byte maximum key macro size
  8275.  
  8276.      About:    The  setmap command is used to define SKsh keyboard
  8277.                editing maps.   SKsh  is  capable of emulating most
  8278.                popular  editor styles to a reasonable degree.  The
  8279.                UserMan.doc  file  discusses the theory of SKsh key
  8280.                maps in greater  detail; this is just intended as a
  8281.                reference guide.  Pleas read that section as well.
  8282.  
  8283.                "setmap  -r"  resets all keymaps and key  macros to
  8284.                their default (dumb) state.
  8285.  
  8286.                "setmap" alone or with an  optional -s flag is used
  8287.                to set keymaps.  The first  argument is integer be-
  8288.                tween  0  and  31  indicating the keymap to change.
  8289.                All  subsequent arguments are grouped in pairs; the
  8290.                first of the pair is  a  character (such as "A") or
  8291.                an ascii code  (such  as  08).   The  second of the
  8292.                pair is one of:
  8293.  
  8294.                   1) a  function name (such as  "DEL").   In  this
  8295.                      case  the  function will be executed when the
  8296.                      key is pressed.
  8297.  
  8298.                   2) another  keymap  number  prefixed by '@'.  In
  8299.                      this  case  the  new  keymap will  become the
  8300.                      current keymap when the key is pressed.
  8301.  
  8302.                   3) a  macro  number  prefixed by '!'.   In  this
  8303.                      case the macro will be  executed when the key
  8304.                      is pressed.
  8305.  
  8306.                "setmap -n" sets  the  keymaps  to  be  non-exiting
  8307.                keymaps.  In other  words,  after a function is ex-
  8308.                ecuted  in  the  current keymap it remains the cur-
  8309.                rent keymap.
  8310.  
  8311.  
  8312.  
  8313.        SKsh Amiga Shell            Page 126            Reference Manual
  8314.  
  8315.  
  8316.  
  8317.  
  8318.  
  8319.  
  8320.  
  8321.  
  8322.  
  8323.                "setmap  -e"  sets  the  keymaps  to  be  "exiting"
  8324.                keymaps which  exit  to  keymap "exitmap" after one
  8325.                function.
  8326.  
  8327.                "setmap -m"  defines a numbered macro (macronum) to
  8328.                be a series of functions or strings.
  8329.  
  8330.  
  8331.      Notes:    The following are legal keymap functions when  used
  8332.                with "setmap -s" or "setmap -m"
  8333.  
  8334.                   INS    - insert typed character
  8335.                   NOP    -  perform no operation
  8336.                   ACC    - "accept" and execute line
  8337.                   REP    - set repeat count
  8338.                   FNK    - execute function key
  8339.                   BS     - backspace
  8340.                   BOL    - move to beginning of line
  8341.                   ZAP    - delete all of current line
  8342.                   DEL    - delete one character forward
  8343.                   EOL    - move to end of line
  8344.                   RHT    - move cursor right one character
  8345.                   LFT    - move cursor left one character
  8346.                   KEL    - kill to end of the line
  8347.                   UP     - move to previous history line
  8348.                   DN     - move to next history line
  8349.                   EXE    - "execute" line and move to next
  8350.                   FWW    - move forward one word
  8351.                   BKW    - move backward one word
  8352.                   BDW    - backward delete word (before cursor)
  8353.                   DLW    - delete word (in front of cursor)
  8354.                   SRH    - search for text in history list
  8355.                   CC1    - command completion type 1 (esc esc)
  8356.                   CC2    - command completion type 2 (esc =)
  8357.                   CC3    - command completion type 3 (esc *)
  8358.                   HOL    - head of list (first history line)
  8359.                   TOL    - tail of list (last history line)
  8360.                   ILP    - insert last parameter of previous line
  8361.                   ILT    - insert tail of previous line
  8362.                   TIM    - toggle insert mode
  8363.                   RDL    - redraw current line
  8364.                   SPC    - switch two previous characters
  8365.                   ISM    - change to insert mode (from any mode)
  8366.                   OVS    - change to overstrike mode
  8367.                   PIO    - change to previous insert/overstrike
  8368.                   YNK    - insert text from yank buffer
  8369.                   CEL    - copy text to EOL into yank buffer
  8370.                   ERC    - explicitly set repeat count
  8371.                   GK0    - goto keymap 0 (for use in macros)
  8372.                   GK1    - goto keymap 1 (for use in macros)
  8373.                   GK2    - goto keymap 2 (for use in macros)
  8374.                   GK3    - goto keymap 3 (for use in macros)
  8375.                   GK4    - goto keymap 4 (for use in macros)
  8376.  
  8377.  
  8378.  
  8379.        SKsh Amiga Shell            Page 127            Reference Manual
  8380.  
  8381.  
  8382.  
  8383.  
  8384.  
  8385.  
  8386.  
  8387.  
  8388.  
  8389.      Example:  # reset all keymaps
  8390.                setmap -r
  8391.  
  8392.                # set keymaps 1 and 3 to be non-exiting
  8393.                setmap -n 1 3
  8394.  
  8395.                # set keymaps 2 and 4 to exit to keymap number 1
  8396.                setmap -e 1  2 4
  8397.  
  8398.                # set macro number 0 to move to the beginning of
  8399.                # the line, insert a '#', and accept the line
  8400.                setmap -m 0  BOL '#' ACC
  8401.  
  8402.                # set the "esc" key to move to keymap 1, the "del"
  8403.                # key to delete a character, and the "~" key to
  8404.                # execute macro number 5
  8405.                setmap -s 0   27 @1  04 DEL  '~' '!5'
  8406.  
  8407.      See Also: UserMan.doc:
  8408.                Advanced Topics: Definable Keyboard Editing
  8409.  
  8410.        _________________________________________________________________
  8411.  
  8412.  
  8413.  
  8414.  
  8415.  
  8416.  
  8417.  
  8418.  
  8419.  
  8420.  
  8421.  
  8422.  
  8423.  
  8424.  
  8425.  
  8426.  
  8427.  
  8428.  
  8429.  
  8430.  
  8431.  
  8432.  
  8433.  
  8434.  
  8435.  
  8436.  
  8437.  
  8438.  
  8439.  
  8440.  
  8441.  
  8442.  
  8443.  
  8444.  
  8445.        SKsh Amiga Shell            Page 128            Reference Manual
  8446.  
  8447.  
  8448.  
  8449.  
  8450.  
  8451.  
  8452.  
  8453.  
  8454.  
  8455.        _________________________________________________________________
  8456.  
  8457.      Name:     SHARED_TYPE
  8458.  
  8459.      Type:     Variable
  8460.  
  8461.      Default:  n/a
  8462.  
  8463.      Usage:    $SHARED_TYPE
  8464.  
  8465.      Range:    n/a
  8466.  
  8467.      About:    This  variable  contains  the  string  'master'  or
  8468.                'slave',  depending on  the  master/slave status of
  8469.                this shell.  See the UserMan.doc for details.
  8470.  
  8471.      Example:
  8472.  
  8473.      See Also:
  8474.  
  8475.        _________________________________________________________________
  8476.  
  8477.  
  8478.  
  8479.  
  8480.  
  8481.  
  8482.  
  8483.  
  8484.  
  8485.  
  8486.  
  8487.  
  8488.  
  8489.  
  8490.  
  8491.  
  8492.  
  8493.  
  8494.  
  8495.  
  8496.  
  8497.  
  8498.  
  8499.  
  8500.  
  8501.  
  8502.  
  8503.  
  8504.  
  8505.  
  8506.  
  8507.  
  8508.  
  8509.  
  8510.  
  8511.        SKsh Amiga Shell            Page 129            Reference Manual
  8512.  
  8513.  
  8514.  
  8515.  
  8516.  
  8517.  
  8518.  
  8519.  
  8520.  
  8521.        _________________________________________________________________
  8522.  
  8523.      Name:     SHELL
  8524.  
  8525.      Type:     Variable
  8526.  
  8527.      Default:  sksh
  8528.  
  8529.      Usage:    $SHELL
  8530.  
  8531.      Range:    n/a
  8532.  
  8533.      About:    This  variable is set by SKsh to the string "sksh".
  8534.                It can be used to  test  which  shell  is  running,
  8535.                provided  that  the  alternate shell has a  similar
  8536.                syntax.
  8537.  
  8538.      Example:  if [ "$SHELL" != 'sksh' ]
  8539.                then
  8540.                    echo "This runs only under SKsh!"
  8541.                fi
  8542.  
  8543.      See Also: SYSNAME
  8544.  
  8545.        _________________________________________________________________
  8546.  
  8547.  
  8548.  
  8549.  
  8550.  
  8551.  
  8552.  
  8553.  
  8554.  
  8555.  
  8556.  
  8557.  
  8558.  
  8559.  
  8560.  
  8561.  
  8562.  
  8563.  
  8564.  
  8565.  
  8566.  
  8567.  
  8568.  
  8569.  
  8570.  
  8571.  
  8572.  
  8573.  
  8574.  
  8575.  
  8576.  
  8577.        SKsh Amiga Shell            Page 130            Reference Manual
  8578.  
  8579.  
  8580.  
  8581.  
  8582.  
  8583.  
  8584.  
  8585.  
  8586.  
  8587.        _________________________________________________________________
  8588.  
  8589.      Name:     shift
  8590.  
  8591.      Type:     Builtin
  8592.  
  8593.      Default:  n/a
  8594.  
  8595.      Usage:    shift [ num ]
  8596.  
  8597.      Range:    n/a
  8598.  
  8599.      About:    This  command  is  used  inside of scripts or func-
  8600.                tions to shift  the  parametric arguments.  For ex-
  8601.                ample, if $1  =  'foo'  and  $2  =  'bar',  after a
  8602.                shift, $1 would be 'bar' and $2 would not  be  set.
  8603.                The  '$#'  and  '$*'  variables are  also  modified
  8604.                appropriately.  If shift is given a  numeric param-
  8605.                eter, it  acts  as  though  num  consecutive shifts
  8606.                took place.
  8607.  
  8608.      Example:  function my_func {
  8609.                   echo "$2, $#"
  8610.                   shift
  8611.                   echo "$2, $#"
  8612.                }
  8613.  
  8614.      See Also: function
  8615.  
  8616.        _________________________________________________________________
  8617.  
  8618.  
  8619.  
  8620.  
  8621.  
  8622.  
  8623.  
  8624.  
  8625.  
  8626.  
  8627.  
  8628.  
  8629.  
  8630.  
  8631.  
  8632.  
  8633.  
  8634.  
  8635.  
  8636.  
  8637.  
  8638.  
  8639.  
  8640.  
  8641.  
  8642.  
  8643.        SKsh Amiga Shell            Page 131            Reference Manual
  8644.  
  8645.  
  8646.  
  8647.  
  8648.  
  8649.  
  8650.  
  8651.  
  8652.  
  8653.        _________________________________________________________________
  8654.  
  8655.      Name:     SIZE
  8656.  
  8657.      Type:     Variable
  8658.  
  8659.      Default:  "normal" for plain SKsh
  8660.                "tiny" for tiny_SKsh
  8661.  
  8662.      Usage:    $SIZE
  8663.  
  8664.      Range:    n/a
  8665.  
  8666.      About:    This  variable can be used to test the shell under which a
  8667.                script or function is being run.
  8668.  
  8669.      Example:  if [ "$SIZE" = 'normal' ]
  8670.                then
  8671.                   echo 'This is normal SKsh'
  8672.                else
  8673.                   echo 'This is tiny_SKsh'
  8674.                fi
  8675.  
  8676.      See Also:
  8677.  
  8678.        _________________________________________________________________
  8679.  
  8680.  
  8681.  
  8682.  
  8683.  
  8684.  
  8685.  
  8686.  
  8687.  
  8688.  
  8689.  
  8690.  
  8691.  
  8692.  
  8693.  
  8694.  
  8695.  
  8696.  
  8697.  
  8698.  
  8699.  
  8700.  
  8701.  
  8702.  
  8703.  
  8704.  
  8705.  
  8706.  
  8707.  
  8708.  
  8709.        SKsh Amiga Shell            Page 132            Reference Manual
  8710.  
  8711.  
  8712.  
  8713.  
  8714.  
  8715.  
  8716.  
  8717.  
  8718.  
  8719.        _________________________________________________________________
  8720.  
  8721.      Name:     sleep
  8722.  
  8723.      Type:     Builtin
  8724.  
  8725.      Default:  n/a
  8726.  
  8727.      Usage:    sleep n
  8728.  
  8729.      Range:    n/a
  8730.  
  8731.      About:    Sleep  delays  execution  for  n seconds.  If  n is
  8732.                omitted,  zero,  or  negative, the command does not
  8733.                pause.   Sleep  takes   virtually no CPU time.   It
  8734.                will  wake  up  once  per  second to check for  the
  8735.                break key.  Sleep is  not  guaranteed to be a delay
  8736.                of  exactly  n  seconds; it may be more on a loaded
  8737.                system, or if SKsh is  preempted by a higher prior-
  8738.                ity process.   It  is,  however, guaranteed to be a
  8739.                delay of at least n seconds.
  8740.  
  8741.      Example:  time sleep 5
  8742.  
  8743.      See Also: time
  8744.  
  8745.        _________________________________________________________________
  8746.  
  8747.  
  8748.  
  8749.  
  8750.  
  8751.  
  8752.  
  8753.  
  8754.  
  8755.  
  8756.  
  8757.  
  8758.  
  8759.  
  8760.  
  8761.  
  8762.  
  8763.  
  8764.  
  8765.  
  8766.  
  8767.  
  8768.  
  8769.  
  8770.  
  8771.  
  8772.  
  8773.  
  8774.  
  8775.        SKsh Amiga Shell            Page 133            Reference Manual
  8776.  
  8777.  
  8778.  
  8779.  
  8780.  
  8781.  
  8782.  
  8783.  
  8784.  
  8785.        _________________________________________________________________
  8786.  
  8787.      Name:     source
  8788.  
  8789.      Type:     Builtin
  8790.  
  8791.      Default:  n/a
  8792.  
  8793.      Usage:    source [ file ... ]
  8794.  
  8795.      Range:    n/a
  8796.  
  8797.      About:    This  command  "sources" the named files; that  is,
  8798.                they  are  executed, but not in a subshell, so that
  8799.                any  variables, alias, etc,  that  they  define are
  8800.                really defined in the parent's environment.
  8801.  
  8802.                A single dot ('.') may be used to source a file  as
  8803.                well; this is compatible with ksh and sh.
  8804.  
  8805.                A file which is sourced does not have to  have  its
  8806.                script bit set  (although it won't hurt).  However,
  8807.                a script file which  is  to  be  executed by typing
  8808.                its name must have its script bit set.
  8809.  
  8810.                Executing a file is equivalent to:
  8811.  
  8812.                   ( source file )
  8813.  
  8814.      Example:  source my_init_file.sksh
  8815.  
  8816.      See Also:
  8817.  
  8818.        _________________________________________________________________
  8819.  
  8820.  
  8821.  
  8822.  
  8823.  
  8824.  
  8825.  
  8826.  
  8827.  
  8828.  
  8829.  
  8830.  
  8831.  
  8832.  
  8833.  
  8834.  
  8835.  
  8836.  
  8837.  
  8838.  
  8839.  
  8840.  
  8841.        SKsh Amiga Shell            Page 134            Reference Manual
  8842.  
  8843.  
  8844.  
  8845.  
  8846.  
  8847.  
  8848.  
  8849.  
  8850.  
  8851.        _________________________________________________________________
  8852.  
  8853.      Name:     stack
  8854.  
  8855.      Type:     Function
  8856.  
  8857.      Default:  n/a
  8858.  
  8859.      Usage:    obsolete
  8860.  
  8861.      Range:    n/a
  8862.  
  8863.      About:    This  function  was  obsoleted in SKsh 1.5.   See  the
  8864.                Addendum1.5.doc file for an explanation.
  8865.  
  8866.      Example:
  8867.  
  8868.      See Also: Addendum1.5.doc
  8869.  
  8870.        _________________________________________________________________
  8871.  
  8872.  
  8873.  
  8874.  
  8875.  
  8876.  
  8877.  
  8878.  
  8879.  
  8880.  
  8881.  
  8882.  
  8883.  
  8884.  
  8885.  
  8886.  
  8887.  
  8888.  
  8889.  
  8890.  
  8891.  
  8892.  
  8893.  
  8894.  
  8895.  
  8896.  
  8897.  
  8898.  
  8899.  
  8900.  
  8901.  
  8902.  
  8903.  
  8904.  
  8905.  
  8906.  
  8907.        SKsh Amiga Shell            Page 135            Reference Manual
  8908.  
  8909.  
  8910.  
  8911.  
  8912.  
  8913.  
  8914.  
  8915.  
  8916.  
  8917.        _________________________________________________________________
  8918.  
  8919.      Name:     SYSNAME
  8920.  
  8921.      Type:     Variable
  8922.  
  8923.      Default:  'Amiga'
  8924.  
  8925.      Usage:    $SYSNAME
  8926.  
  8927.      Range:    n/a
  8928.  
  8929.      About:    This  variable  describes the  system on which SKsh
  8930.                is  currently  being run.  There is  currently only
  8931.                one  version of SKsh, so this variable will contain
  8932.                "Amiga".  If SKsh is ported to other  systems, this
  8933.                variable can be used  to  determine the name of the
  8934.                system.
  8935.  
  8936.      Example:  if [ "$SYSNAME" != 'Amiga' ]
  8937.                then
  8938.                   echo "This script runs only on Amigas."
  8939.                fi
  8940.  
  8941.      See Also: SHELL
  8942.  
  8943.        _________________________________________________________________
  8944.  
  8945.  
  8946.  
  8947.  
  8948.  
  8949.  
  8950.  
  8951.  
  8952.  
  8953.  
  8954.  
  8955.  
  8956.  
  8957.  
  8958.  
  8959.  
  8960.  
  8961.  
  8962.  
  8963.  
  8964.  
  8965.  
  8966.  
  8967.  
  8968.  
  8969.  
  8970.  
  8971.  
  8972.  
  8973.        SKsh Amiga Shell            Page 136            Reference Manual
  8974.  
  8975.  
  8976.  
  8977.  
  8978.  
  8979.  
  8980.  
  8981.  
  8982.  
  8983.        _________________________________________________________________
  8984.  
  8985.      Name:     tackon
  8986.  
  8987.      Type:     Builtin
  8988.  
  8989.      Default:  n/a
  8990.  
  8991.      Usage:    tackon [ -e ] [ fspec ] ...
  8992.  
  8993.      Range:    n/a
  8994.  
  8995.      About:    tackon  assembles  its  arguments into a path name,
  8996.                inserting slashes where appropriate.  For  example,
  8997.                if the  first  argument is "ram:" and the second is
  8998.                "myfile",  tackon will not  insert a slash, as none
  8999.                is  required.    However, if the first argument had
  9000.                been  "mydir", a slash  would  be  inserted.   None
  9001.                would  be  inserted for "mydir/" as it already con-
  9002.                tains a slash.
  9003.  
  9004.                If  the  -e  option is given, any  characters which
  9005.                need to  be  backslash  escaped will be.  These in-
  9006.                clude wildcard  characters and whitespace.  This is
  9007.                useful to  create a filename which can be passed to
  9008.                the  shell  unquoted  without invoking the wildcard
  9009.                expansion mechanism.
  9010.  
  9011.      Example:  [prompt]: tackon ram: foo/bar/ not
  9012.                   ram:foo/bar/not
  9013.                [prompt]: tackon -e 'ram:f*o' 'b ar'
  9014.                   ram:f\*o/b\ ar
  9015.  
  9016.      See Also: echo
  9017.  
  9018.        _________________________________________________________________
  9019.  
  9020.  
  9021.  
  9022.  
  9023.  
  9024.  
  9025.  
  9026.  
  9027.  
  9028.  
  9029.  
  9030.  
  9031.  
  9032.  
  9033.  
  9034.  
  9035.  
  9036.  
  9037.  
  9038.  
  9039.        SKsh Amiga Shell            Page 137            Reference Manual
  9040.  
  9041.  
  9042.  
  9043.  
  9044.  
  9045.  
  9046.  
  9047.  
  9048.  
  9049.        _________________________________________________________________
  9050.  
  9051.      Name:     time
  9052.  
  9053.      Type:     Keyword
  9054.  
  9055.      Default:  n/a
  9056.  
  9057.      Usage:    time statement
  9058.  
  9059.      Range:    n/a
  9060.  
  9061.      About:    time  executes the  statement and prints the execu-
  9062.                tion time in seconds.
  9063.  
  9064.      Example:  time ( dir; sleep 2 )
  9065.  
  9066.      See Also:
  9067.  
  9068.        _________________________________________________________________
  9069.  
  9070.  
  9071.  
  9072.  
  9073.  
  9074.  
  9075.  
  9076.  
  9077.  
  9078.  
  9079.  
  9080.  
  9081.  
  9082.  
  9083.  
  9084.  
  9085.  
  9086.  
  9087.  
  9088.  
  9089.  
  9090.  
  9091.  
  9092.  
  9093.  
  9094.  
  9095.  
  9096.  
  9097.  
  9098.  
  9099.  
  9100.  
  9101.  
  9102.  
  9103.  
  9104.  
  9105.        SKsh Amiga Shell            Page 138            Reference Manual
  9106.  
  9107.  
  9108.  
  9109.  
  9110.  
  9111.  
  9112.  
  9113.  
  9114.  
  9115.        _________________________________________________________________
  9116.  
  9117.      Name:     tolower
  9118.  
  9119.      Type:     Builtin
  9120.  
  9121.      Default:  n/a
  9122.  
  9123.      Usage:    tolower [ -nc ] [ parameter ... ]
  9124.  
  9125.      Range:    n/a
  9126.  
  9127.      About:    This  command echos its  arguments, converting all up-
  9128.                per  case  characters to lower case.   The  -n  option
  9129.                will  not  append a newline, and  the  -c  option will
  9130.                concatenate arguments, similar to echo.
  9131.  
  9132.      Example:  tolower 'These' 'are ECHoEd' 'iN LowER caSE'
  9133.  
  9134.      See Also: toupper, capital, echo
  9135.  
  9136.        _________________________________________________________________
  9137.  
  9138.  
  9139.  
  9140.  
  9141.  
  9142.  
  9143.  
  9144.  
  9145.  
  9146.  
  9147.  
  9148.  
  9149.  
  9150.  
  9151.  
  9152.  
  9153.  
  9154.  
  9155.  
  9156.  
  9157.  
  9158.  
  9159.  
  9160.  
  9161.  
  9162.  
  9163.  
  9164.  
  9165.  
  9166.  
  9167.  
  9168.  
  9169.  
  9170.  
  9171.        SKsh Amiga Shell            Page 139            Reference Manual
  9172.  
  9173.  
  9174.  
  9175.  
  9176.  
  9177.  
  9178.  
  9179.  
  9180.  
  9181.        _________________________________________________________________
  9182.  
  9183.      Name:     touch
  9184.  
  9185.      Type:     Builtin
  9186.  
  9187.      Default:  n/a
  9188.  
  9189.      Usage:    touch [ file ... ]
  9190.  
  9191.      Range:    n/a
  9192.  
  9193.      About:    touch  create the named files if they do not exist,
  9194.                and  in  any  case  updates the  file  modification
  9195.                timestamp.   It  also   resets the AmigaDos archive
  9196.                bit.
  9197.  
  9198.      Example:  touch aaa bbb ccc
  9199.  
  9200.      See Also:
  9201.  
  9202.        _________________________________________________________________
  9203.  
  9204.  
  9205.  
  9206.  
  9207.  
  9208.  
  9209.  
  9210.  
  9211.  
  9212.  
  9213.  
  9214.  
  9215.  
  9216.  
  9217.  
  9218.  
  9219.  
  9220.  
  9221.  
  9222.  
  9223.  
  9224.  
  9225.  
  9226.  
  9227.  
  9228.  
  9229.  
  9230.  
  9231.  
  9232.  
  9233.  
  9234.  
  9235.  
  9236.  
  9237.        SKsh Amiga Shell            Page 140            Reference Manual
  9238.  
  9239.  
  9240.  
  9241.  
  9242.  
  9243.  
  9244.  
  9245.  
  9246.  
  9247.        _________________________________________________________________
  9248.  
  9249.      Name:     toupper
  9250.  
  9251.      Type:     Builtin
  9252.  
  9253.      Default:  n/a
  9254.  
  9255.      Usage:    toupper [ -nc ] [ parameter ... ]
  9256.  
  9257.      Range:    n/a
  9258.  
  9259.      About:    This  command  echos  its  arguments,  converting  all
  9260.                lower  case  characters to  upper case.  The -n option
  9261.                will  not  append a newline, and  the  -c  option will
  9262.                concatenate arguments, similar to echo.
  9263.  
  9264.      Example:  toupper 'These' 'are ECHoEd' 'iN LowER caSE'
  9265.  
  9266.      See Also: tolower, capital, echo
  9267.  
  9268.        _________________________________________________________________
  9269.  
  9270.  
  9271.  
  9272.  
  9273.  
  9274.  
  9275.  
  9276.  
  9277.  
  9278.  
  9279.  
  9280.  
  9281.  
  9282.  
  9283.  
  9284.  
  9285.  
  9286.  
  9287.  
  9288.  
  9289.  
  9290.  
  9291.  
  9292.  
  9293.  
  9294.  
  9295.  
  9296.  
  9297.  
  9298.  
  9299.  
  9300.  
  9301.  
  9302.  
  9303.        SKsh Amiga Shell            Page 141            Reference Manual
  9304.  
  9305.  
  9306.  
  9307.  
  9308.  
  9309.  
  9310.  
  9311.  
  9312.  
  9313.        _________________________________________________________________
  9314.  
  9315.      Name:     true
  9316.  
  9317.      Type:     Builtin
  9318.  
  9319.      Default:  n/a
  9320.  
  9321.      Usage:    true
  9322.  
  9323.      Range:    n/a
  9324.  
  9325.      About:    true  simply  returns a true exit  code,  and  does
  9326.                nothing else.
  9327.  
  9328.      Example:  while true
  9329.                do
  9330.                   echo 'repeat forever!'
  9331.                   sleep 1
  9332.                done
  9333.  
  9334.      See Also: false
  9335.  
  9336.        _________________________________________________________________
  9337.  
  9338.  
  9339.  
  9340.  
  9341.  
  9342.  
  9343.  
  9344.  
  9345.  
  9346.  
  9347.  
  9348.  
  9349.  
  9350.  
  9351.  
  9352.  
  9353.  
  9354.  
  9355.  
  9356.  
  9357.  
  9358.  
  9359.  
  9360.  
  9361.  
  9362.  
  9363.  
  9364.  
  9365.  
  9366.  
  9367.  
  9368.  
  9369.        SKsh Amiga Shell            Page 142            Reference Manual
  9370.  
  9371.  
  9372.  
  9373.  
  9374.  
  9375.  
  9376.  
  9377.  
  9378.  
  9379.        _________________________________________________________________
  9380.  
  9381.      Name:     unalias
  9382.  
  9383.      Type:     Alias
  9384.  
  9385.      Default:  unset -a
  9386.  
  9387.      Usage:    unalias [ name ... ]
  9388.  
  9389.      Range:    n/a
  9390.  
  9391.      About:    This  alias  removes existing aliases from the cur-
  9392.                rent context.  If no names are given,  the  command
  9393.                has  no  effect.    Otherwise, each alias listed is
  9394.                removed, if it was in fact an alias.
  9395.  
  9396.                SKsh  supplied aliases may be  removed, but this is
  9397.                not recommended.
  9398.  
  9399.      Example:  unalias my_alias my_other_alias
  9400.  
  9401.      See Also: unset
  9402.  
  9403.        _________________________________________________________________
  9404.  
  9405.  
  9406.  
  9407.  
  9408.  
  9409.  
  9410.  
  9411.  
  9412.  
  9413.  
  9414.  
  9415.  
  9416.  
  9417.  
  9418.  
  9419.  
  9420.  
  9421.  
  9422.  
  9423.  
  9424.  
  9425.  
  9426.  
  9427.  
  9428.  
  9429.  
  9430.  
  9431.  
  9432.  
  9433.  
  9434.  
  9435.        SKsh Amiga Shell            Page 143            Reference Manual
  9436.  
  9437.  
  9438.  
  9439.  
  9440.  
  9441.  
  9442.  
  9443.  
  9444.  
  9445.        _________________________________________________________________
  9446.  
  9447.      Name:     unfunc
  9448.  
  9449.      Type:     Alias
  9450.  
  9451.      Default:  unset -f
  9452.  
  9453.      Usage:    unfunc [ name ... ]
  9454.  
  9455.      Range:    n/a
  9456.  
  9457.      About:    This  alias  removes  existing  functions from  the
  9458.                current context.  If no names are given,  the  com-
  9459.                mand  has  no  effect.    Otherwise, each  function
  9460.                listed is removed, if it was in fact an function.
  9461.  
  9462.                SKsh  supplied  functions may be  removed, but this
  9463.                is not recommended.
  9464.  
  9465.      Example:  unfunc my_function my_other_function
  9466.  
  9467.      See Also: unset
  9468.  
  9469.        _________________________________________________________________
  9470.  
  9471.  
  9472.  
  9473.  
  9474.  
  9475.  
  9476.  
  9477.  
  9478.  
  9479.  
  9480.  
  9481.  
  9482.  
  9483.  
  9484.  
  9485.  
  9486.  
  9487.  
  9488.  
  9489.  
  9490.  
  9491.  
  9492.  
  9493.  
  9494.  
  9495.  
  9496.  
  9497.  
  9498.  
  9499.  
  9500.  
  9501.        SKsh Amiga Shell            Page 144            Reference Manual
  9502.  
  9503.  
  9504.  
  9505.  
  9506.  
  9507.  
  9508.  
  9509.  
  9510.  
  9511.        _________________________________________________________________
  9512.  
  9513.      Name:     unset
  9514.  
  9515.      Type:     Builtin
  9516.  
  9517.      Default:  n/a
  9518.  
  9519.      Usage:    unset [ -favb ] [ name ... ] 
  9520.  
  9521.      Range:    n/a
  9522.  
  9523.      About:    This  command  removes the definition of functions,
  9524.                aliases,  variables, or builtins (controlled by the
  9525.                f, a, v, or b flags).  If no  flag  is  given,  the
  9526.                default is to remove variable definitions.
  9527.  
  9528.                Unsetting  a  builtin (with the -b option) does not
  9529.                cause  actual code  to  be  removed from memory; it
  9530.                simply  removes  all  internal  references to  that
  9531.                command, such that  it  appears to no longer exist.
  9532.                This  can  cause  problems if not  used  carefully;
  9533.                only  attempt this if you are sure  you  know  what
  9534.                effects this will  have.   For  example, if you re-
  9535.                move  the  'exit'  builtin, you will not be able to
  9536.                quit SKsh.
  9537.  
  9538.      Example:  unset -f my_func1 my_func2
  9539.  
  9540.      See Also: unfunc, unalias
  9541.  
  9542.        _________________________________________________________________
  9543.  
  9544.  
  9545.  
  9546.  
  9547.  
  9548.  
  9549.  
  9550.  
  9551.  
  9552.  
  9553.  
  9554.  
  9555.  
  9556.  
  9557.  
  9558.  
  9559.  
  9560.  
  9561.  
  9562.  
  9563.  
  9564.  
  9565.  
  9566.  
  9567.        SKsh Amiga Shell            Page 145            Reference Manual
  9568.  
  9569.  
  9570.  
  9571.  
  9572.  
  9573.  
  9574.  
  9575.  
  9576.  
  9577.        _________________________________________________________________
  9578.  
  9579.      Name:     usage
  9580.  
  9581.      Type:     Script
  9582.  
  9583.      Default:  n/a
  9584.  
  9585.      Usage:    usage [ script | binary | builtin ]...
  9586.  
  9587.      Range:    n/a
  9588.  
  9589.      About:    Usage executes each given command, passing  it  one
  9590.                parameter of '-?'  to  generate  a  usage  message.
  9591.                The  command  can  be  any  SKsh  supplied  script,
  9592.                binary, or builtin.  If more than one parameter  is
  9593.                given, each one is executed in turn.
  9594.  
  9595.      Example:  usage history fgrep
  9596.  
  9597.      See Also:
  9598.  
  9599.        _________________________________________________________________
  9600.  
  9601.  
  9602.  
  9603.  
  9604.  
  9605.  
  9606.  
  9607.  
  9608.  
  9609.  
  9610.  
  9611.  
  9612.  
  9613.  
  9614.  
  9615.  
  9616.  
  9617.  
  9618.  
  9619.  
  9620.  
  9621.  
  9622.  
  9623.  
  9624.  
  9625.  
  9626.  
  9627.  
  9628.  
  9629.  
  9630.  
  9631.  
  9632.  
  9633.        SKsh Amiga Shell            Page 146            Reference Manual
  9634.  
  9635.  
  9636.  
  9637.  
  9638.  
  9639.  
  9640.  
  9641.  
  9642.  
  9643.        _________________________________________________________________
  9644.  
  9645.      Name:     variables
  9646.  
  9647.      Type:     Alias
  9648.  
  9649.      Default:  set -v
  9650.  
  9651.      Usage:    variables [ -s ] [ pattern ... ]
  9652.  
  9653.      Range:    n/a
  9654.  
  9655.      About:    This  alias  lists  defined variables.  The pattern
  9656.                uses  normal wildcards, but must be quoted to avoid
  9657.                being   interpreted  by  the   filename   expansion
  9658.                mechanism.   If  the  pattern is omitted, all vari-
  9659.                ables  are  listed  except those  beginning with an
  9660.                underscore  character  (hidden variables).  For ex-
  9661.                ample,  _ANSI_P1  is  a  hidden variable; if it was
  9662.                printed  in  the  normal variable list, the display
  9663.                pen would be changed.
  9664.  
  9665.                Only  variables for the current context are listed,
  9666.                so this  command may have a different effect inside
  9667.                of   a   subshell  or   function  than  when  typed
  9668.                manually.
  9669.  
  9670.      Example:  variables -s '[A-H]*'
  9671.  
  9672.      See Also: set
  9673.  
  9674.        _________________________________________________________________
  9675.  
  9676.  
  9677.  
  9678.  
  9679.  
  9680.  
  9681.  
  9682.  
  9683.  
  9684.  
  9685.  
  9686.  
  9687.  
  9688.  
  9689.  
  9690.  
  9691.  
  9692.  
  9693.  
  9694.  
  9695.  
  9696.  
  9697.  
  9698.  
  9699.        SKsh Amiga Shell            Page 147            Reference Manual
  9700.  
  9701.  
  9702.  
  9703.  
  9704.  
  9705.  
  9706.  
  9707.  
  9708.  
  9709.        _________________________________________________________________
  9710.  
  9711.      Name:     version
  9712.  
  9713.      Type:     Builtin
  9714.  
  9715.      Default:  n/a
  9716.  
  9717.      Usage:    version [ -ds ]
  9718.  
  9719.      Range:    n/a
  9720.  
  9721.      About:    version  with  no  options prints the SKsh  version
  9722.                string  and  copyright notice.  The 'd' option ech-
  9723.                oes  the  compile date of SKsh, and the 's'  option
  9724.                prints  a   single   numeric  value  that  will  be
  9725.                incremented  for  each  release of SKsh.   This  is
  9726.                useful in tests, as below.
  9727.  
  9728.      Example:  if [ $(version -s) -lt 3 ]
  9729.                then
  9730.                   echo  'This  script  requires   a   later   SKsh
  9731.                version'
  9732.                fi
  9733.  
  9734.      See Also:
  9735.  
  9736.        _________________________________________________________________
  9737.  
  9738.  
  9739.  
  9740.  
  9741.  
  9742.  
  9743.  
  9744.  
  9745.  
  9746.  
  9747.  
  9748.  
  9749.  
  9750.  
  9751.  
  9752.  
  9753.  
  9754.  
  9755.  
  9756.  
  9757.  
  9758.  
  9759.  
  9760.  
  9761.  
  9762.  
  9763.  
  9764.  
  9765.        SKsh Amiga Shell            Page 148            Reference Manual
  9766.  
  9767.  
  9768.  
  9769.  
  9770.  
  9771.  
  9772.  
  9773.  
  9774.  
  9775.        _________________________________________________________________
  9776.  
  9777.      Name:     vi_mode
  9778.  
  9779.      Type:     Script
  9780.  
  9781.      Default:  n/a
  9782.  
  9783.      Usage:    vi_mode
  9784.  
  9785.      Range:    n/a
  9786.  
  9787.      About:    vi_mode  executes  a  series of  setmap commands to
  9788.                implement  a  vi-like  command  line  editing mode.
  9789.                This does not operate with Tiny_SKsh.
  9790.  
  9791.      Example:  vi_mode  # set vi command line editing.
  9792.  
  9793.      See Also: emacs_mode, setmap
  9794.  
  9795.        _________________________________________________________________
  9796.  
  9797.  
  9798.  
  9799.  
  9800.  
  9801.  
  9802.  
  9803.  
  9804.  
  9805.  
  9806.  
  9807.  
  9808.  
  9809.  
  9810.  
  9811.  
  9812.  
  9813.  
  9814.  
  9815.  
  9816.  
  9817.  
  9818.  
  9819.  
  9820.  
  9821.  
  9822.  
  9823.  
  9824.  
  9825.  
  9826.  
  9827.  
  9828.  
  9829.  
  9830.  
  9831.        SKsh Amiga Shell            Page 149            Reference Manual
  9832.  
  9833.  
  9834.  
  9835.  
  9836.  
  9837.  
  9838.  
  9839.  
  9840.  
  9841.        _________________________________________________________________
  9842.  
  9843.      Name:     whence
  9844.  
  9845.      Type:     Builtin
  9846.  
  9847.      Default:  n/a
  9848.  
  9849.      Usage:    whence [ name ... ]
  9850.  
  9851.      Range:    n/a
  9852.  
  9853.      About:    whence  reports how each name would be  interpreted
  9854.                if it was  used  as  a  command.   It  will  report
  9855.                whether the name will  be  interpreted as a builtin
  9856.                command,  an  alias,  a  function, or  an  external
  9857.                statement.   If  the   command is interpreted as an
  9858.                external  statement,  a  path  to  the  command  is
  9859.                printed.
  9860.  
  9861.      Example:  whence whence if path ll
  9862.  
  9863.      See Also: which
  9864.  
  9865.        _________________________________________________________________
  9866.  
  9867.  
  9868.  
  9869.  
  9870.  
  9871.  
  9872.  
  9873.  
  9874.  
  9875.  
  9876.  
  9877.  
  9878.  
  9879.  
  9880.  
  9881.  
  9882.  
  9883.  
  9884.  
  9885.  
  9886.  
  9887.  
  9888.  
  9889.  
  9890.  
  9891.  
  9892.  
  9893.  
  9894.  
  9895.  
  9896.  
  9897.        SKsh Amiga Shell            Page 150            Reference Manual
  9898.  
  9899.  
  9900.  
  9901.  
  9902.  
  9903.  
  9904.  
  9905.  
  9906.  
  9907.        _________________________________________________________________
  9908.  
  9909.      Name:     which
  9910.  
  9911.      Type:     Builtin
  9912.  
  9913.      Default:  n/a
  9914.  
  9915.      Usage:    which [ -s ] [ name ... ]
  9916.  
  9917.      Range:    n/a
  9918.  
  9919.      About:    which  searches  the  current PATH  variable for an
  9920.                occurrence of name.  If it finds one, the  path  to
  9921.                name is  printed.   Multiple names are accepted, in
  9922.                which case the process is repeated for each one.
  9923.  
  9924.                If  the  '-s'  option is set, which will  terminate
  9925.                silently if the name is not  found  in  the  search
  9926.                path.    Normally  it  prints  a  message  to  that
  9927.                effect.
  9928.  
  9929.                Although  which does  not  know  about  aliases  or
  9930.                functions  as  whence does, it is often more useful
  9931.                in scripts or from the  command line.  For example,
  9932.                if you know that "my_file" is in the  search  path,
  9933.                you can say:
  9934.  
  9935.                   ll $(which -s my_file)
  9936.  
  9937.                to  print  information on  my_file  without knowing
  9938.                where  it  is.   The  example below is another pos-
  9939.                sible use.  In the  function, which is used both to
  9940.                avoid  interpreting  "run"  recursively as a  func-
  9941.                tion, and  to  find  the  desired binary.  A better
  9942.                form  of  the  'run'  function is included with the
  9943.                default '.skshinit' file.
  9944.  
  9945.      Example:  function run {
  9946.                   cmd="$1"
  9947.                   shift
  9948.                   $(which -s run) $(which $cmd) $*
  9949.                }
  9950.  
  9951.      See Also: whence
  9952.  
  9953.        _________________________________________________________________
  9954.  
  9955.  
  9956.  
  9957.  
  9958.  
  9959.  
  9960.  
  9961.  
  9962.  
  9963.        SKsh Amiga Shell            Page 151            Reference Manual
  9964.  
  9965.  
  9966.  
  9967.  
  9968.  
  9969.  
  9970.  
  9971.  
  9972.  
  9973.        _________________________________________________________________
  9974.  
  9975.      Name:     while/do/done
  9976.  
  9977.      Type:     Keywords
  9978.  
  9979.      Default:  n/a
  9980.  
  9981.      Usage:    while expr do stmt_list done
  9982.  
  9983.      Range:    n/a
  9984.  
  9985.      About:    The  statement list  is  executed while the expres-
  9986.                sion is true (returns a zero exit status).
  9987.  
  9988.      Example:  a=1
  9989.                while [ $a -le 10 ]
  9990.                do
  9991.                   echo "a = $a"
  9992.                done
  9993.  
  9994.      See Also: for
  9995.  
  9996.        _________________________________________________________________
  9997.  
  9998.  
  9999.  
  10000.  
  10001.  
  10002.  
  10003.  
  10004.  
  10005.  
  10006.  
  10007.  
  10008.  
  10009.  
  10010.  
  10011.  
  10012.  
  10013.  
  10014.  
  10015.  
  10016.  
  10017.  
  10018.  
  10019.  
  10020.  
  10021.  
  10022.  
  10023.  
  10024.  
  10025.  
  10026.  
  10027.  
  10028.  
  10029.        SKsh Amiga Shell            Page 152            Reference Manual
  10030.  
  10031.  
  10032.  
  10033.