home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff279.lzh / Ash / Reference.doc < prev    next >
Text File  |  1989-11-20  |  103KB  |  5,875 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.                                   Reference Manual 
  18.  
  19.                                          ASH
  20.  
  21.                             A ksh-like Shell for the Amiga
  22.  
  23.                                      Version 1.0
  24.  
  25.  
  26.                                   (Copyright) 1989 
  27.  
  28.                                      Steve Koren
  29.  
  30.                                    November 7, 1989
  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......................................4
  77.                !, !!.............................................5
  78.                _ANSI.............................................6
  79.                alias.............................................7
  80.                aliases...........................................8
  81.                argcount..........................................9
  82.                ASHINIT...........................................10
  83.                ash...............................................11
  84.                basename..........................................12
  85.                break.............................................13
  86.                builtins..........................................14
  87.                cat...............................................15
  88.                cd................................................16
  89.                clear, cls........................................17
  90.                CLINUM............................................18
  91.                CMDNUM............................................19
  92.                COLUMNS...........................................21
  93.                continue..........................................22
  94.                cp................................................23
  95.                ctpri.............................................24
  96.                date..............................................25
  97.                dec...............................................26
  98.                dirname...........................................27
  99.                echo..............................................28
  100.                exit..............................................29
  101.                export............................................30
  102.                false.............................................32
  103.                for/do/done.......................................33
  104.                force.............................................34
  105.                function..........................................35
  106.                functions.........................................36
  107.                getenv............................................37
  108.                head..............................................38
  109.                history...........................................39
  110.                HISTSIZE..........................................40
  111.                HOME..............................................41
  112.                IFS...............................................43
  113.                inc...............................................44
  114.                info..............................................45
  115.                LINES.............................................46
  116.                local.............................................47
  117.                LOGOUT............................................48
  118.                ls................................................49
  119.                match.............................................50
  120.                mem...............................................51
  121.                mkdir.............................................52
  122.                mv................................................53
  123.                OLDPWD............................................54
  124.                options...........................................55
  125.                PATH..............................................57
  126.                path..............................................58
  127.  
  128.  
  129.           ASH Amiga Shell               Page 2            Reference Manual
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.                PNPC..............................................59
  140.                ps................................................60
  141.                PS1...............................................61
  142.                PS2...............................................62
  143.                PWD...............................................63
  144.                pwd...............................................64
  145.                read..............................................65
  146.                return............................................66
  147.                rm................................................67
  148.                rmdir.............................................68
  149.                set...............................................69
  150.                SHELL.............................................70
  151.                shift.............................................71
  152.                sleep.............................................72
  153.                source............................................73
  154.                stack.............................................74
  155.                SYSNAME...........................................76
  156.                tail..............................................77
  157.                time..............................................78
  158.                true..............................................79
  159.                unalias...........................................80
  160.                unfunc............................................81
  161.                unset.............................................82
  162.                variables.........................................83
  163.                version...........................................84
  164.                wc................................................85
  165.                whence............................................86
  166.                which.............................................87
  167.                while/do/done.....................................88
  168.                xd................................................89
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.           ASH Amiga Shell               Page 3            Reference Manual
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.           Introduction
  206.  
  207.             This reference manual describes each Ash  command,  variable,
  208.             alias, or function in a concise manner.  Each  page  contains
  209.             the following information:
  210.  
  211.             Name:     The name of the command, alias, etc.
  212.  
  213.             Type:     Variable, Alias,  Function,  Builtin,  Keyword,  or
  214.                       External Command.
  215.  
  216.             Default:  The default value for variables, or definition  for
  217.                       aliases.
  218.  
  219.             Usage:    Command syntax
  220.  
  221.             Range:    Legal values for variables or parameters
  222.  
  223.             About:    Text describing the command, variable, etc.
  224.  
  225.             Example:  A brief example usage.
  226.  
  227.             See Also: Other related commands, variables, etc.
  228.  
  229.             When reading the command syntax, anything in square  brackets
  230.             is  optional.   Anything  followed  by  three  dots  can   be
  231.             repeated any number of times.  A  vertical  bar  is  used  to
  232.             separate option where one or the other, but not both, can  be
  233.             used.
  234.  
  235.             In general, options to commands are preceded by  a  dash  ('-
  236.             ').  The dash character passed alone tells a command to  stop
  237.             reading options.  This can be useful to  pass  a  dash  as  a
  238.             parameter.  For example,
  239.  
  240.                     echo - -
  241.  
  242.             would print a single dash.
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.           ASH Amiga Shell               Page 4            Reference Manual
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.           _________________________________________________________________
  272.  
  273.             Name:     !, !!
  274.  
  275.             Type:     Alias
  276.  
  277.             Default:  history -e
  278.                       history -e -1
  279.  
  280.             Usage:    ! [ pattern | abs_num | rel_num ]
  281.                       !!
  282.  
  283.             Range:    n/a
  284.  
  285.             About:    These two aliases provide an easy way  to  use  the
  286.                       history  -e  command.  !! will execute the previous
  287.                       command from the history list by executing  history
  288.                       -e  -1.    ! will execute a specified command  from
  289.                       the history list.  This command can either  specify
  290.                       an absolute number,  a  relative  offset  from  the
  291.                       most  recent  command   (the   offset   should   be
  292.                       negative), or a partial line or pattern  to  search
  293.                       for.  If a search pattern is given,  it  should  be
  294.                       enclosed in quotes so that  Ash  does  not  attempt
  295.                       file name generation on the wildcard pattern.
  296.  
  297.             Example:  ! cc
  298.  
  299.             See Also: history
  300.  
  301.           _________________________________________________________________
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.           ASH Amiga Shell               Page 5            Reference Manual
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.           _________________________________________________________________
  338.  
  339.             Name:     _ANSI_BS
  340.                       _ANSI_BE
  341.                       _ANSI_P1
  342.                       _ANSI_P2
  343.                       _ANSI_P3
  344.                       _ANSI_CLEAR
  345.  
  346.             Type:     Variable
  347.  
  348.             Default:  "^[[1m"
  349.                       "^[[m"
  350.                       "^[[0;31;40m"
  351.                       "^[[0;32;40m"
  352.                       "^[[0;33;40m"
  353.                       "^[[H^[[2J"
  354.  
  355.             Usage:    $_ANSI_??
  356.  
  357.             Range:    n/a
  358.  
  359.             About:    These variables  are  set  by  Ash  to  valid  ANSI
  360.                       escape sequences which control  the  Amiga  console
  361.                       device.  They can be used  in  echo  statements  or
  362.                       prompts.
  363.  
  364.                       Since these  variables,  when  output,  affect  the
  365.                       console device, they are  not  normally  output  by
  366.                       the set command.
  367.  
  368.             Example:  echo $_ANSI_CLEAR      # clear the screen
  369.  
  370.             See Also: echo
  371.  
  372.           _________________________________________________________________
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.           ASH Amiga Shell               Page 6            Reference Manual
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.           _________________________________________________________________
  404.  
  405.             Name:     alias
  406.  
  407.             Type:     Builtin
  408.  
  409.             Default:  n/a
  410.  
  411.             Usage:    alias [ pattern | string [ '=' ] string ]
  412.  
  413.             Range:    n/a
  414.  
  415.             About:    The alias builtin command (not to be confused  with
  416.                       'aliases', which is itself an  alias)  is  used  to
  417.                       set and list aliases.  If given no  parameters,  it
  418.                       simply acts as a 'set -a' command.   If  given  one
  419.                       parameter,  which  is  a   pattern,   all   aliases
  420.                       matching that pattern are printed.   If  given  two
  421.                       parameters (or there where the second  is  a  '='),
  422.                       the first string becomes an alias with  the  second
  423.                       string as its definition.
  424.  
  425.                       Aliases are expanded when used as a  command.   Any
  426.                       arguments are appended to the text of  the  aliases
  427.                       and the resulting string is executed.
  428.  
  429.                       Unlike  ksh and sh, there can be spaces surrounding
  430.                       the '=' sign, which is itself optional.
  431.  
  432.             Example:  alias foo='echo "This is the foo alias"'
  433.  
  434.             See Also: set, alias, unalias
  435.  
  436.           _________________________________________________________________
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.           ASH Amiga Shell               Page 7            Reference Manual
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.           _________________________________________________________________
  470.  
  471.             Name:     aliases
  472.  
  473.             Type:     Alias
  474.  
  475.             Default:  set -a
  476.  
  477.             Usage:    aliases [-s] [pattern]
  478.  
  479.             Range:    n/a
  480.  
  481.             About:    This alias  lists  defined  aliases.   The  pattern
  482.                       uses normal wildcards, but must be quoted to  avoid
  483.                       being  interpreted  by   the   filename   expansion
  484.                       mechanism.  If the pattern is omitted, all  aliases
  485.                       in the current  context  are  listed  except  those
  486.                       beginning with an underscore (hidden aliases).
  487.  
  488.                       Only aliases for the current  context  are  listed,
  489.                       so this command may have a different effect  inside
  490.                       of  a  subshell  or  function   than   when   typed
  491.                       manually.
  492.  
  493.             Example:  aliases -s '[a-h]*'
  494.  
  495.             See Also: set, alias
  496.  
  497.           _________________________________________________________________
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.           ASH Amiga Shell               Page 8            Reference Manual
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.           _________________________________________________________________
  536.  
  537.             Name:     argcount
  538.  
  539.             Type:     Builtin
  540.  
  541.             Default:  n/a
  542.  
  543.             Usage:    argcount [ parameter ... ]
  544.  
  545.             Range:    n/a
  546.  
  547.             About:    argcount simply prints a count of its arguments.
  548.  
  549.             Example:  argcount should 'print two'
  550.  
  551.             See Also:
  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.           ASH Amiga Shell               Page 9            Reference Manual
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.           _________________________________________________________________
  602.  
  603.             Name:     ASHINIT
  604.  
  605.             Type:     Variable
  606.  
  607.             Default:  "s:.ashrc"
  608.  
  609.             Usage:    $ASHINIT
  610.  
  611.             Range:    n/a
  612.  
  613.             About:    This variable is set in the .ashinit  file  to  the
  614.                       name  of  a  user  modifiable  configuration  file.
  615.                       Normally   this   is    "s:.ashrc".     The    user
  616.                       configuration file is sourced (not  executed!)  for
  617.                       interactive Ash sessions.
  618.  
  619.                       The   s:.ashrc   file   is   provided   for    user
  620.                       modification.  Users should not modify  s:.ashinit.
  621.                       If you wish to change something that is defined  in
  622.                       s:.ashinit,  simply  redefine   it   in   s:.ashrc.
  623.                       s:.ashrc is sourced after s:.ashinit.
  624.  
  625.                       Your s:.ashrc  file  may  optionally  source  other
  626.                       files.
  627.  
  628.             Example:
  629.  
  630.             See Also: ash, source
  631.  
  632.           _________________________________________________________________
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.           ASH Amiga Shell              Page 10            Reference Manual
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.           _________________________________________________________________
  668.  
  669.             Name:     ash
  670.  
  671.             Type:     External Command
  672.  
  673.             Default:  n/a
  674.  
  675.             Usage:    ash [ -c string | fspec ... ]
  676.  
  677.             Range:    n/a
  678.  
  679.             About:    This is,  of  course,  the  main  Ash  binary.   If
  680.                       invoked with  no  parameters,  an  interactive  Ash
  681.                       session is  started.   If  invoked  with  the  '-c'
  682.                       option  followed  by  a  string,  the   string   is
  683.                       executed by Ash as if it had been  typed,  and  Ash
  684.                       exits when  the  operation  is  complete.   If  the
  685.                       string contains spaces, it must  be  surrounded  by
  686.                       quotes  (although  this  depends  on  the  invoking
  687.                       shell or environment).  If  invoked  with  filespec
  688.                       arguments, each  file  in  turn  is  executed  (not
  689.                       sourced).  Ash then exits when  finished  executing
  690.                       all the files.
  691.  
  692.                       If Ash is invoked non-interactively, it will  still
  693.                       read the .ashinit file, but not  the  .ashrc  file.
  694.                       This allows you to have output  statements  in  the
  695.                       .ashrc file without having this output appear  when
  696.                       non-interacrive scripts are  run.   If  you  really
  697.                       want to run the .ashrc file first, use:
  698.  
  699.                          ash s:.ashrc my_file.ash
  700.  
  701.             Example:  ash -c "expr 21 * 2"
  702.  
  703.             See Also: source
  704.  
  705.           _________________________________________________________________
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.           ASH Amiga Shell              Page 11            Reference Manual
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.           _________________________________________________________________
  734.  
  735.             Name:     basename
  736.  
  737.             Type:     Builtin
  738.  
  739.             Default:  n/a
  740.  
  741.             Usage:    basename [ fspec ... ]
  742.  
  743.             Range:    n/a
  744.  
  745.             About:    basename prints the "base" name of  a  given  path.
  746.                       For example, the basename of  sys:System/Format  is
  747.                       simply Format.  Note that the  basename  may  be  a
  748.                       directory  and  not  a  file;  for   example,   the
  749.                       basename of sys:usr/bin is bin, even though bin  is
  750.                       a directory.   If  basename is passed more than one
  751.                       parameter,  it  prints   the   basename   of   each
  752.                       parameter in turn.
  753.  
  754.             Example:  basename sys:usr/bin/wc
  755.  
  756.             See Also: dirname
  757.  
  758.           _________________________________________________________________
  759.  
  760.  
  761.  
  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.           ASH Amiga Shell              Page 12            Reference Manual
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.           _________________________________________________________________
  800.  
  801.             Name:     break
  802.  
  803.             Type:     Builtin
  804.  
  805.             Default:  n/a
  806.  
  807.             Usage:    break [ num ]
  808.  
  809.             Range:    n/a
  810.  
  811.             About:    break exits gracefully  from  an  enclosing  for or
  812.                       while loop.  If a numeric  argument  is  given,  it
  813.                       breaks from that many enclosing  levels  of  for or
  814.                       while.
  815.  
  816.             Example:  for a in a b c d e f
  817.                       do
  818.                          echo $a
  819.                          if [ "$a" = "c" ] then break; fi
  820.                       done
  821.  
  822.             See Also: continue
  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.           ASH Amiga Shell              Page 13            Reference Manual
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.           _________________________________________________________________
  866.  
  867.             Name:     builtins
  868.  
  869.             Type:     Alias
  870.  
  871.             Default:  set -b
  872.  
  873.             Usage:    builtins [-s] [pattern]
  874.  
  875.             Range:    n/a
  876.  
  877.             About:    This  aliases  lists  Ash  builtin  commands.   The
  878.                       pattern uses normal wildcards, but must  be  quoted
  879.                       to  avoid  being  interpreted   by   the   filename
  880.                       expansion mechanism.  If the  pattern  is  omitted,
  881.                       all builtins  are  listed  except  those  beginning
  882.                       with an  underscore  character  (hidden  builtins).
  883.                       There are currently no hidden builtins.
  884.  
  885.             Example:  builtins -s '[a-h]*'
  886.  
  887.             See Also: set
  888.  
  889.           _________________________________________________________________
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.           ASH Amiga Shell              Page 14            Reference Manual
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.           _________________________________________________________________
  932.  
  933.             Name:     cat
  934.  
  935.             Type:     Builtin
  936.  
  937.             Default:  n/a
  938.  
  939.             Usage:    cat [ fspec ... ]
  940.  
  941.             Range:    n/a
  942.  
  943.             About:    cat prints the contents of each file passed  to  it
  944.                       on the command line, or the standard  input  if  no
  945.                       files are passed.  The contents of  each  file  are
  946.                       concatenated,  and  are  not  separated  by   blank
  947.                       lines.
  948.  
  949.                       In  Ash,  cat cannot be  used  to  transfer  binary
  950.                       files, only ASCII data.  Also, the sequence:
  951.  
  952.                          cat my_file.txt > my_file1.txt
  953.  
  954.                       can be faster accomplished with the cp command.
  955.  
  956.             Example:  cat my_file.txt
  957.  
  958.             See Also: cp
  959.  
  960.           _________________________________________________________________
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.           ASH Amiga Shell              Page 15            Reference Manual
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.           _________________________________________________________________
  998.  
  999.             Name:     cd
  1000.  
  1001.             Type:     Builtin
  1002.  
  1003.             Default:  n/a
  1004.  
  1005.             Usage:    cd [ -p | dirname ]
  1006.  
  1007.             Range:    n/a
  1008.  
  1009.             About:    cd  changes  the  current  working   directory   to
  1010.                       dirname,  or  to  the   previous   directory   (the
  1011.                       contents of the OLDPWD variable) if the -p flag  is
  1012.                       set.  If no parameters are passed,  cd moves to the
  1013.                       directory indicated by the HOME variable.  This  is
  1014.                       convenient when you are doing most of your work  in
  1015.                       one place, and wish to return there easily.   Under
  1016.                       AmigaDos, the HOME variable  can  be  changed  very
  1017.                       easily with:
  1018.  
  1019.                          HOME=.
  1020.  
  1021.                       That is, you do not have  to  worry  about  certain
  1022.                       files being in the HOME directory as you  do  in  a
  1023.                       multi-user operating system such as UNIX.
  1024.  
  1025.             Example:  cd -p        # go back to old directory
  1026.  
  1027.             See Also: PWD, pwd, OLDDIR
  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.           ASH Amiga Shell              Page 16            Reference Manual
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.           _________________________________________________________________
  1064.  
  1065.             Name:     clear, cls
  1066.  
  1067.             Type:     Alias
  1068.  
  1069.             Default:  echo -n $_ANSI_CLEAR
  1070.  
  1071.             Usage:    clear
  1072.  
  1073.             Range:    n/a
  1074.  
  1075.             About:    These aliases both  clear  the  screen  by  echoing
  1076.                       $_ANSI_CLEAR.
  1077.  
  1078.             Example:  clear
  1079.  
  1080.             See Also: _ANSI_CLEAR
  1081.  
  1082.           _________________________________________________________________
  1083.  
  1084.  
  1085.  
  1086.  
  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.           ASH Amiga Shell              Page 17            Reference Manual
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.           _________________________________________________________________
  1130.  
  1131.             Name:     CLINUM
  1132.  
  1133.             Type:     Variable
  1134.  
  1135.             Default:  n/a
  1136.  
  1137.             Usage:    $CLINUM
  1138.  
  1139.             Range:    1 to maximum process number limit
  1140.  
  1141.             About:    This variable is set to the CLI process  number  of
  1142.                       Ash when it is started.
  1143.  
  1144.             Example:  echo "Process # = $CLINUM"
  1145.  
  1146.             See Also:
  1147.  
  1148.           _________________________________________________________________
  1149.  
  1150.  
  1151.  
  1152.  
  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.           ASH Amiga Shell              Page 18            Reference Manual
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.           _________________________________________________________________
  1196.  
  1197.             Name:     CMDNUM
  1198.  
  1199.             Type:     Variable
  1200.  
  1201.             Default:  n/a
  1202.  
  1203.             Usage:    $CMDNUM
  1204.  
  1205.             Range:    1 to 16 million
  1206.  
  1207.             About:    Each time Ash inputs  a  line  from  the  keyboard,
  1208.                       this variable is incremented.
  1209.  
  1210.             Example:  echo "$CMDNUM lines have been entered so far."
  1211.  
  1212.             See Also: history
  1213.  
  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.           ASH Amiga Shell              Page 19            Reference Manual
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.           _________________________________________________________________
  1262.  
  1263.             Name:     cmp
  1264.  
  1265.             Type:     External Command
  1266.  
  1267.             Default:  n/a
  1268.  
  1269.             Usage:    cmp [ -s ] file1 file2
  1270.  
  1271.             Range:    n/a
  1272.  
  1273.             About:    cmp compares two files for  equality.   It  can  be
  1274.                       used on binary as well  as  textual  data.   cmp is
  1275.                       fast in that if the files are not  the  same  size,
  1276.                       it won't even bother comparing the contents of  the
  1277.                       files.     cmp  normally  outputs  a  message  that
  1278.                       indicates  whether  the   files   are   the   same,
  1279.                       different, or one is shorter than  the  other.   If
  1280.                       the -s option is  used,  compare  does  not  output
  1281.                       this information, but simply returns  a  zero  exit
  1282.                       status if the files were the same, or  non-zero  if
  1283.                       they were not.
  1284.  
  1285.             Example:  if cmp -s file1 file2
  1286.                       then
  1287.                          echo 'file1 is the same as file2'
  1288.                       else
  1289.                          echo 'file1 is different than file2'
  1290.                       fi
  1291.  
  1292.             See Also:
  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.           ASH Amiga Shell              Page 20            Reference Manual
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.           _________________________________________________________________
  1328.  
  1329.             Name:     COLUMNS
  1330.  
  1331.             Type:     Variable
  1332.  
  1333.             Default:  72
  1334.  
  1335.             Usage:    $COLUMNS
  1336.  
  1337.             Range:    15 to 130
  1338.  
  1339.             About:    This variable is one  of  several  responsible  for
  1340.                       controlling the actions of  Ash  line  editing  and
  1341.                       display output.  If line editing  is  enabled,  and
  1342.                       the cursor moves beyond  the  column  indicated  by
  1343.                       this variable, Ash slides the line to the  left  by
  1344.                       12 characters.  Ash  also  uses  this  variable  to
  1345.                       truncate  the  output  of  certain   internal   Ash
  1346.                       commands  (such  as  History).   This   creates   a
  1347.                       cleaner display.
  1348.  
  1349.             Example:  COLUMNS=78
  1350.  
  1351.             See Also: PNPC, LINES, options
  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.           ASH Amiga Shell              Page 21            Reference Manual
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.           _________________________________________________________________
  1394.  
  1395.             Name:     continue
  1396.  
  1397.             Type:     Builtin
  1398.  
  1399.             Default:  n/a
  1400.  
  1401.             Usage:    continue [ num ]
  1402.  
  1403.             Range:    n/a
  1404.  
  1405.             About:    continue resumes execution with the next  iteration
  1406.                       of the surrounding  loop,  or  the  nth  subsequent
  1407.                       iteration if given a numeric argument.
  1408.  
  1409.             Example:  for a in a b c d e f
  1410.                       do
  1411.                          echo $a
  1412.                          if [ "$a" = "c" ] then continue; fi
  1413.                          echo "This is not echoed when $a = c"
  1414.                       done
  1415.  
  1416.             See Also: break
  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.           ASH Amiga Shell              Page 22            Reference Manual
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.           _________________________________________________________________
  1460.  
  1461.             Name:     cp
  1462.  
  1463.             Type:     Builtin
  1464.  
  1465.             Default:  n/a
  1466.  
  1467.             Usage:    cp file1 file2
  1468.                       cp file1 [ file2 ... ] dir
  1469.                       cp -r dir1 dir2
  1470.  
  1471.             Range:    n/a
  1472.  
  1473.             About:    cp  copies  files  from  one  place   to   another,
  1474.                       optionally renaming them in the  process.   If  the
  1475.                       destination is a  directory,  the  files  have  the
  1476.                       same name in the destination  directory.   If  more
  1477.                       than one file is copied, the destination must be  a
  1478.                       directory.  The -r flag means do a recursive copy.
  1479.  
  1480.             Example:  cp my_file1 m_file2 my_file3 my_directory
  1481.  
  1482.             See Also: mv
  1483.  
  1484.           _________________________________________________________________
  1485.  
  1486.  
  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.           ASH Amiga Shell              Page 23            Reference Manual
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.           _________________________________________________________________
  1526.  
  1527.             Name:     ctpri
  1528.  
  1529.             Type:     Alias
  1530.  
  1531.             Default:  ChangeTaskPri
  1532.  
  1533.             Usage:    ctpri
  1534.                       ctpri num
  1535.  
  1536.             Range:    -31 <= num <= 31
  1537.  
  1538.             About:    This alias is provided as  a  shorter  alternative  to
  1539.                       the  AmigaDos  ChangeTaskPri  command.   Its  use   is
  1540.                       identical.
  1541.  
  1542.             Example:  ctpri 1
  1543.  
  1544.             See Also: stack
  1545.  
  1546.           _________________________________________________________________
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.           ASH Amiga Shell              Page 24            Reference Manual
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.           _________________________________________________________________
  1592.  
  1593.             Name:     date
  1594.  
  1595.             Type:     Builtin
  1596.  
  1597.             Default:  n/a
  1598.  
  1599.             Usage:    date [-aDmdty]
  1600.  
  1601.             Range:    n/a
  1602.  
  1603.             About:    Date  prints  the  current  date  as  a  24  character
  1604.                       string:
  1605.  
  1606.                          DDD mmm dd hh:mm:ss yyyy
  1607.  
  1608.                       Date  with  the  -a (all) option is identical to  date
  1609.                       with no parameters, (which prints the date as  above).
  1610.                       Date  -D prints a three  character  representation  of
  1611.                       the  day  of  the  week.    Date  -m  prints  a  three
  1612.                       character  representation  of  the  month.    Date  -d
  1613.                       prints the day number as two  digits.   Date -t prints
  1614.                       the time string,  and  date -y prints the year as four
  1615.                       digits.
  1616.  
  1617.             Example:  date -y    # find the year
  1618.  
  1619.             See Also: time
  1620.  
  1621.           _________________________________________________________________
  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.           ASH Amiga Shell              Page 25            Reference Manual
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.  
  1657.           _________________________________________________________________
  1658.  
  1659.             Name:     dec
  1660.  
  1661.             Type:     Builtin
  1662.  
  1663.             Default:  n/a
  1664.  
  1665.             Usage:    dec var [ count ]
  1666.  
  1667.             Range:    n/a
  1668.  
  1669.             About:    dec decrements the  contents  of  the  variable  by
  1670.                       count,  or  1  if  count  is  not  given.   It   is
  1671.                       equivalent to, but faster than, 'var=$(expr $var  -
  1672.                       $count)'
  1673.  
  1674.             Example:  dec my_var 3
  1675.  
  1676.             See Also: inc
  1677.  
  1678.           _________________________________________________________________
  1679.  
  1680.  
  1681.  
  1682.  
  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.           ASH Amiga Shell              Page 26            Reference Manual
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.           _________________________________________________________________
  1724.  
  1725.             Name:     dirname
  1726.  
  1727.             Type:     Builtin
  1728.  
  1729.             Default:  n/a
  1730.  
  1731.             Usage:    dirname [ fspec ... ]
  1732.  
  1733.             Range:    n/a
  1734.  
  1735.             About:    dirname prints the  "directory"  name  of  a  given
  1736.                       path.     For    example,    the     dirname     of
  1737.                       sys:System/Format is simply sys:System. If  dirname
  1738.                       is passed more than one parameter,  it  prints  the
  1739.                       dirname of each parameter in turn.
  1740.  
  1741.             Example:  dirname sys:usr/bin/wc
  1742.  
  1743.             See Also: basename
  1744.  
  1745.           _________________________________________________________________
  1746.  
  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.           ASH Amiga Shell              Page 27            Reference Manual
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.           _________________________________________________________________
  1790.  
  1791.             Name:     echo
  1792.  
  1793.             Type:     Builtin
  1794.  
  1795.             Default:  n/a
  1796.  
  1797.             Usage:    echo [-nc] [ parameter ... ]
  1798.  
  1799.             Range:    n/a
  1800.  
  1801.             About:    The  echo  command  simply  prints  its  arguments  to
  1802.                       standard output.  If given no arguments, it  prints  a
  1803.                       newline.   Otherwise,   it   prints   its   arguments,
  1804.                       separated by a single space, unless  the  -c option is
  1805.                       set, in which case no separating  spaces  are  printed
  1806.                       (concatenation  mode).    Echo   normally   prints   a
  1807.                       trailing  newline,  unless  the  -n option is set,  in
  1808.                       which case no trailing newline is printed.
  1809.  
  1810.                       'echo -c' is useful for concatenating strings:
  1811.  
  1812.                          result = $(echo -c This '+' That)
  1813.  
  1814.             Example:  echo 'These' 'arguments' are "echoed"
  1815.  
  1816.             See Also:
  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.           ASH Amiga Shell              Page 28            Reference Manual
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.           _________________________________________________________________
  1856.  
  1857.             Name:     exit
  1858.  
  1859.             Type:     Builtin
  1860.  
  1861.             Default:  n/a
  1862.  
  1863.             Usage:    exit [ code ]
  1864.  
  1865.             Range:    n/a
  1866.  
  1867.             About:    exit leaves Ash, returning execution  back  to  the
  1868.                       invoking  shell.   If  invoked   with   a   numeric
  1869.                       argument,  it  returns  that  exit  code   to   the
  1870.                       invoking shell or program.
  1871.  
  1872.                       Note  that  exit always  exits  Ash  entirely.   To
  1873.                       simply exit a script or function,  use  the  return
  1874.                       statement.  If  the  LOGOUT  variable  is  defined,
  1875.                       exit will execute that string before terminating.
  1876.  
  1877.             Example:  exit    # exits successfully
  1878.  
  1879.             See Also: return, LOGOUT
  1880.  
  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.           ASH Amiga Shell              Page 29            Reference Manual
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.           _________________________________________________________________
  1922.  
  1923.             Name:     export
  1924.  
  1925.             Type:     Builtin
  1926.  
  1927.             Default:  n/a
  1928.  
  1929.             Usage:    export [ var ... ]
  1930.  
  1931.             Range:    n/a
  1932.  
  1933.             About:    export does two things.  It sets the value  of  the
  1934.                       indicated variables in the topmost symbol table  in
  1935.                       Ash, and it sets an AmigaDos  environment  variable
  1936.                       with the same name and value.   This  is  the  only
  1937.                       way to transfer variable values between  executions
  1938.                       of Ash.
  1939.  
  1940.             Example:  export my_var1 my_var2
  1941.  
  1942.             See Also: getenv
  1943.  
  1944.           _________________________________________________________________
  1945.  
  1946.  
  1947.  
  1948.  
  1949.  
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.           ASH Amiga Shell              Page 30            Reference Manual
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.           _________________________________________________________________
  1988.  
  1989.             Name:     expr
  1990.  
  1991.             Type:     Keyword
  1992.  
  1993.             Default:  n/a
  1994.  
  1995.             Usage:    expr length string
  1996.                       expr num_expression
  1997.                       expr index str pattern
  1998.                       expr substr num1 num2
  1999.  
  2000.             Range:    n/a
  2001.  
  2002.             About:    expr  evaluates  and  prints  the  results  of   an
  2003.                       expression.
  2004.  
  2005.                       expr length string
  2006.  
  2007.                          prints the length in characters of the string
  2008.  
  2009.                       expr num_expression
  2010.  
  2011.                          prints the result of evaluating  num_expression.
  2012.                          num_expression   is   an   integer    expression
  2013.                          computed with 32 bit integers.  '+',  '-',  '*',
  2014.                          '/', and '%' can be used.   '*',  '/',  and  '%'
  2015.                          have a  higher  precedence  than  '+'  and  '-';
  2016.                          otherwise, the expression is evaluated  left  to
  2017.                          right.  Parentheses can be used.
  2018.  
  2019.                       expr index str pattern
  2020.  
  2021.                          prints the index of  pattern  if  found  in  the
  2022.                          string, or 0 if not found.  The  first  position
  2023.                          in string is 1, not 0.  Unlike ksh, pattern  can
  2024.                          be more than one character.
  2025.  
  2026.                       expr substr string num1 num2
  2027.  
  2028.                          prints the substring of the string  starting  at
  2029.                          the position indicated  by  num1  and  extending
  2030.                          for  num2  characters.   The  beginning  of  the
  2031.                          string is at position one, not 0.
  2032.  
  2033.             Example:  expr 3 * ( 1 + 4 )
  2034.  
  2035.             See Also:
  2036.  
  2037.           _________________________________________________________________
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.           ASH Amiga Shell              Page 31            Reference Manual
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.           _________________________________________________________________
  2054.  
  2055.             Name:     false
  2056.  
  2057.             Type:     Builtin
  2058.  
  2059.             Default:  n/a
  2060.  
  2061.             Usage:    false
  2062.  
  2063.             Range:    n/a
  2064.  
  2065.             About:    false simply returns a false exit  code,  and  does
  2066.                       nothing else.
  2067.  
  2068.             Example:  if false
  2069.                       then
  2070.                          echo 'This will never echo'
  2071.                       fi
  2072.  
  2073.             See Also: true
  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.           ASH Amiga Shell              Page 32            Reference Manual
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.           _________________________________________________________________
  2120.  
  2121.             Name:     for/do/done
  2122.  
  2123.             Type:     Keywords
  2124.  
  2125.             Default:  n/a
  2126.  
  2127.             Usage:    for var in list do stmt_list done
  2128.  
  2129.             Range:    n/a
  2130.  
  2131.             About:    The variable is set to each value in  list, and for
  2132.                       each value, the statement list is executed.
  2133.  
  2134.             Example:  for file in *.h *.c
  2135.                       do
  2136.                          cp $file $file.bak
  2137.                       done
  2138.  
  2139.             See Also: while
  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.           ASH Amiga Shell              Page 33            Reference Manual
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.           _________________________________________________________________
  2186.  
  2187.             Name:     force
  2188.  
  2189.             Type:     Keyword
  2190.  
  2191.             Default:  n/a
  2192.  
  2193.             Usage:    force [ -fba ] command [ parameter ... ]
  2194.  
  2195.             Range:    n/a
  2196.  
  2197.             About:    force  forces  Ash  to   interpret   command  as  a
  2198.                       function, builtin, or alias.  Exactly  one  of  the
  2199.                       'f', 'b', and 'a' flags must be present.   force is
  2200.                       useful if the builtin commands are redefined.
  2201.  
  2202.             Example:  function date {
  2203.                          echo -n 'The date is: '
  2204.                          force -b date
  2205.                       }
  2206.  
  2207.             See Also:
  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.           ASH Amiga Shell              Page 34            Reference Manual
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.           _________________________________________________________________
  2252.  
  2253.             Name:     function
  2254.  
  2255.             Type:     Keyword
  2256.  
  2257.             Default:  n/a
  2258.  
  2259.             Usage:    function name { stmt_list }
  2260.  
  2261.             Range:    n/a
  2262.  
  2263.             About:    function defines an Ash function  called  name, and
  2264.                       with the definition given by the statement list.
  2265.  
  2266.             Example:  function my_func {
  2267.                          echo "I was passed $# parameters"
  2268.  
  2269.             See Also: functions
  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.           ASH Amiga Shell              Page 35            Reference Manual
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.  
  2317.           _________________________________________________________________
  2318.  
  2319.             Name:     functions
  2320.  
  2321.             Type:     Alias
  2322.  
  2323.             Default:  set -f
  2324.  
  2325.             Usage:    functions [pattern]
  2326.  
  2327.             Range:    n/a
  2328.  
  2329.             About:    This alias lists defined  functions.   The  pattern
  2330.                       uses normal wildcards, but must be quoted to  avoid
  2331.                       being  interpreted  by   the   filename   expansion
  2332.                       mechanism.   If  the  pattern   is   omitted,   all
  2333.                       functions are listed except  those  beginning  with
  2334.                       an underscore character (hidden functions).
  2335.  
  2336.                       Only functions for the current context are  listed,
  2337.                       so this command may have a different effect  inside
  2338.                       of  a  subshell  or  function   than   when   typed
  2339.                       manually.
  2340.  
  2341.             Example:  functions '[a-h]*'
  2342.  
  2343.             See Also: set
  2344.  
  2345.           _________________________________________________________________
  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.           ASH Amiga Shell              Page 36            Reference Manual
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.  
  2383.           _________________________________________________________________
  2384.  
  2385.             Name:     getenv
  2386.  
  2387.             Type:     Builtin
  2388.  
  2389.             Default:  n/a
  2390.  
  2391.             Usage:    getenv [ var ... ]
  2392.  
  2393.             Range:    n/a
  2394.  
  2395.             About:    getenv  imports  the  values   of   the   indicated
  2396.                       variable from AmigaDos environment  variables  with
  2397.                       the same names.  This command, coupled with  export
  2398.                       command,  allows  variables   to   be   transferred
  2399.                       between executions of Ash.
  2400.  
  2401.             Example:  getenv my_var1 my_var2
  2402.  
  2403.             See Also: export
  2404.  
  2405.           _________________________________________________________________
  2406.  
  2407.  
  2408.  
  2409.  
  2410.  
  2411.  
  2412.  
  2413.  
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.  
  2421.  
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.           ASH Amiga Shell              Page 37            Reference Manual
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.           _________________________________________________________________
  2450.  
  2451.             Name:     head
  2452.  
  2453.             Type:     External Command
  2454.  
  2455.             Default:  n/a
  2456.  
  2457.             Usage:    head [ -num ] [ file ... ]
  2458.  
  2459.             Range:    0 <= num
  2460.  
  2461.             About:    head  prints  the  first  num lines of  each  named
  2462.                       file,  or  the  standard  input  if  no  files  are
  2463.                       indicated.  If  num is not explicitly set, it has a
  2464.                       default value of 10.
  2465.  
  2466.             Example:  head -5 my_file.c my_other_file.c
  2467.  
  2468.             See Also: tail
  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.           ASH Amiga Shell              Page 38            Reference Manual
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.           _________________________________________________________________
  2516.  
  2517.             Name:     history
  2518.  
  2519.             Type:     Builtin
  2520.  
  2521.             Default:  n/a
  2522.  
  2523.             Usage:    history
  2524.                       history -n
  2525.                       history -e [ pattern | number | offset ]
  2526.  
  2527.             Range:    n/a
  2528.  
  2529.             About:    Ash maintains the HISTSIZE previous commands  in  a
  2530.                       list so that they may later be recalled  or  edited
  2531.                       for re-execution.
  2532.  
  2533.                       history   with  no  parameters  simply  prints  the
  2534.                       history  list,  with  each  line  prefixed  by  the
  2535.                       number  of  the   associated   command.    The   -n
  2536.                       parameter leaves out the line numbers.
  2537.  
  2538.                       history  -e is used to execute  commands  from  the
  2539.                       history  list.   If  given   a   positive   numeric
  2540.                       argument, it executes the history command  at  that
  2541.                       number (note that these numbers  are  derived  from
  2542.                       CMDNUM and do not always begin at  1  if  CMDNUM  >
  2543.                       HISTSIZE).  If given a negative  numeric  argument,
  2544.                       the line executed is the 'nth' before the  current;
  2545.                       thus,  the  example  below  executes  the  previous
  2546.                       command.  If the argument is a string  or  pattern,
  2547.                       the most recent command containing that  string  or
  2548.                       pattern is executed.
  2549.  
  2550.             Example:  history -e -1    # execute previous command
  2551.  
  2552.             See Also: HISTSIZE, !, !!, CMDNUM, command  line  editing  in
  2553.                       the User's Manual.
  2554.  
  2555.           _________________________________________________________________
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.           ASH Amiga Shell              Page 39            Reference Manual
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.           _________________________________________________________________
  2582.  
  2583.             Name:     HISTSIZE
  2584.  
  2585.             Type:     Variable
  2586.  
  2587.             Default:  32
  2588.  
  2589.             Usage:    $HISTSIZE
  2590.  
  2591.             Range:    0 to 256
  2592.  
  2593.             About:    Ash keeps a  list  of  the  $HISTSIZE  most  recent
  2594.                       commands available for editing and re-entry.
  2595.  
  2596.             Example:  HISTSIZE=64
  2597.  
  2598.             See Also: history, options
  2599.  
  2600.           _________________________________________________________________
  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.           ASH Amiga Shell              Page 40            Reference Manual
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.           _________________________________________________________________
  2648.  
  2649.             Name:     HOME
  2650.  
  2651.             Type:     Variable
  2652.  
  2653.             Default:  :
  2654.  
  2655.             Usage:    $HOME
  2656.  
  2657.             Range:    n/a
  2658.  
  2659.             About:    This variable represents  the  default  destination
  2660.                       for  the  cd command.  It can be set to  any  valid
  2661.                       directory name.
  2662.  
  2663.             Example:  HOME=.
  2664.  
  2665.             See Also: cd
  2666.  
  2667.           _________________________________________________________________
  2668.  
  2669.  
  2670.  
  2671.  
  2672.  
  2673.  
  2674.  
  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.           ASH Amiga Shell              Page 41            Reference Manual
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.           _________________________________________________________________
  2714.  
  2715.             Name:     if/then/elif/else/fi
  2716.  
  2717.             Type:     Keywords
  2718.  
  2719.             Default:  n/a
  2720.  
  2721.             Usage:    if expr then stmt_list
  2722.                          [ [ elif expr then stmt_list ] ... ]
  2723.                          [ else stmt_list ] fi
  2724.  
  2725.             Range:    n/a
  2726.  
  2727.             About:    If the expression is true (that is,  it  returns  a
  2728.                       zero exit status), then the  first  statement  list
  2729.                       is executed.  If  any  elif statements are present,
  2730.                       each expression is executed, and  if  it  is  true,
  2731.                       execution procedes  for  the  associated  statement
  2732.                       list.  If none of the expressions  were  true,  the
  2733.                       else statement_list is executed.
  2734.  
  2735.                       The expressions can  be  any  command,  or  a  test
  2736.                       expression surrounded by square brackets  (see  the
  2737.                       user's manual for details).
  2738.  
  2739.             Example:  if [ ! -f name -a ! -d name ]
  2740.                       then
  2741.                          mkdir name
  2742.                       else
  2743.                          echo "$name exists already!"
  2744.                       fi
  2745.  
  2746.             See Also: while
  2747.  
  2748.           _________________________________________________________________
  2749.  
  2750.  
  2751.  
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.           ASH Amiga Shell              Page 42            Reference Manual
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.  
  2777.  
  2778.  
  2779.           _________________________________________________________________
  2780.  
  2781.             Name:     IFS
  2782.  
  2783.             Type:     Variable
  2784.  
  2785.             Default:  " \n\t"
  2786.  
  2787.             Usage:    $IFS
  2788.  
  2789.             Range:    n/a
  2790.  
  2791.             About:    Characters in IFS are  used  to  break  substituted
  2792.                       text  (from  variables  and  command  substitution)
  2793.                       into parameters.  If IFS is set to the null  string
  2794.                       (''),  all  substituted  text  will  be  a   single
  2795.                       parameter.
  2796.  
  2797.                       If the 'i' option to Ash is set  (see  the  options
  2798.                       command), the IFS characters will also be  used  to
  2799.                       break text from $( ) style command substitution.
  2800.  
  2801.             Example:  [dh0:]: IFS=" \n\t"
  2802.                       [dh0:]: a='Now   is   the   time'
  2803.                       [dh0:]: echo $a
  2804.                               Now is the time
  2805.                       [dh0:]: IFS=''
  2806.                       [dh0:]: echo $a
  2807.                               Now   is   the   time
  2808.  
  2809.             See Also:
  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.           ASH Amiga Shell              Page 43            Reference Manual
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843.  
  2844.  
  2845.           _________________________________________________________________
  2846.  
  2847.             Name:     inc
  2848.  
  2849.             Type:     Builtin
  2850.  
  2851.             Default:  n/a
  2852.  
  2853.             Usage:    inc var [ count ]
  2854.  
  2855.             Range:    n/a
  2856.  
  2857.             About:    inc increments the  contents  of  the  variable  by
  2858.                       count,  or  1  if  count  is  not  given.   It   is
  2859.                       equivalent to, but faster than, 'var=$(expr $var  +
  2860.                       $count)'
  2861.  
  2862.             Example:  inc my_var 3
  2863.  
  2864.             See Also: dec
  2865.  
  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.           ASH Amiga Shell              Page 44            Reference Manual
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909.  
  2910.  
  2911.           _________________________________________________________________
  2912.  
  2913.             Name:     info
  2914.  
  2915.             Type:     Builtin
  2916.  
  2917.             Default:  n/a
  2918.  
  2919.             Usage:    info [ device | directory ] ...
  2920.  
  2921.             Range:    n/a
  2922.  
  2923.             About:    info reports the amount of free space available  on
  2924.                       a given  device  or  directory.   It  prints  total
  2925.                       space in kilobytes, used space  in  kilobytes,  the
  2926.                       number of bytes per block, the percentage  capacity
  2927.                       utilization, the total number of  errors,  and  the
  2928.                       volume name.  If  info is given a directory name as
  2929.                       an argument, the free space for  the  directory  is
  2930.                       the same as the free space for the device on  which
  2931.                       the directory resides.
  2932.  
  2933.                       The  Ash  info command reports data  in  1024  byte
  2934.                       kilobytes, not 1000 byte kilobytes.  This may  lead
  2935.                       to a slightly  different  answer  than  other  info
  2936.                       commands.    The   Ash    info  command  will  deal
  2937.                       correctly  with  file  systems  of  up  to  several
  2938.                       gigabytes  (should  you  happen  to  have  one   of
  2939.                       those).
  2940.  
  2941.             Example:  info sys: ram: df0:
  2942.  
  2943.             See Also:
  2944.  
  2945.           _________________________________________________________________
  2946.  
  2947.  
  2948.  
  2949.  
  2950.  
  2951.  
  2952.  
  2953.  
  2954.  
  2955.  
  2956.  
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965.  
  2966.  
  2967.           ASH Amiga Shell              Page 45            Reference Manual
  2968.  
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974.  
  2975.  
  2976.  
  2977.           _________________________________________________________________
  2978.  
  2979.             Name:     LINES
  2980.  
  2981.             Type:     Variable
  2982.  
  2983.             Default:  24
  2984.  
  2985.             Usage:    $LINES
  2986.  
  2987.             Range:    3 to anything
  2988.  
  2989.             About:    This variable is currently not used by Ash;  it  is
  2990.                       provided  for  future  expansion,  and  for   other
  2991.                       applications   or   programs   which    might    be
  2992.                       interested.
  2993.  
  2994.             Example:  if [ $COLUMNS -lt 20 ]
  2995.                       then
  2996.                          echo "We require at least 20 lines!"
  2997.                       fi
  2998.  
  2999.             See Also: COLUMNS
  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.           ASH Amiga Shell              Page 46            Reference Manual
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041.  
  3042.  
  3043.           _________________________________________________________________
  3044.  
  3045.             Name:     local
  3046.  
  3047.             Type:     Builtin
  3048.  
  3049.             Default:  n/a
  3050.  
  3051.             Usage:    local [ varname ... ]
  3052.  
  3053.             Range:    n/a
  3054.  
  3055.             About:    The  local command  can  be  used  to  enforce  the
  3056.                       creation of local variables if the 'N'  option  and
  3057.                       the 'l' to Ash are set (see  the  options command).
  3058.                       Normally with the 'N' option set,  local  variables
  3059.                       are created only  if  they  had  not  been  created
  3060.                       first in an enclosing context.   The  local command
  3061.                       makes  them  local  even  if  there  had   been   a
  3062.                       previously defined variable of the same name in  an
  3063.                       enclosing context.  Note  that  this  command  will
  3064.                       have no effect if Ash local variables are  disabled
  3065.                       by turning off the 'l' option.
  3066.  
  3067.             Example:  function my_func {
  3068.                          local answer;
  3069.                          answer = 42
  3070.                       }
  3071.  
  3072.             See Also: options
  3073.  
  3074.           _________________________________________________________________
  3075.  
  3076.  
  3077.  
  3078.  
  3079.  
  3080.  
  3081.  
  3082.  
  3083.  
  3084.  
  3085.  
  3086.  
  3087.  
  3088.  
  3089.  
  3090.  
  3091.  
  3092.  
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.           ASH Amiga Shell              Page 47            Reference Manual
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.           _________________________________________________________________
  3110.  
  3111.             Name:     LOGOUT
  3112.  
  3113.             Type:     Variable
  3114.  
  3115.             Default:  'echo "\nBye!\n"'
  3116.  
  3117.             Usage:    $LOGOUT
  3118.  
  3119.             Range:    n/a
  3120.  
  3121.             About:    This variable is executed  by  Ash  when  the  exit
  3122.                       command is used to terminate execution.
  3123.  
  3124.             Example:  LOGOUT='';    # do nothing
  3125.  
  3126.             See Also: exit
  3127.  
  3128.           _________________________________________________________________
  3129.  
  3130.  
  3131.  
  3132.  
  3133.  
  3134.  
  3135.  
  3136.  
  3137.  
  3138.  
  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.           ASH Amiga Shell              Page 48            Reference Manual
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.  
  3173.  
  3174.  
  3175.           _________________________________________________________________
  3176.  
  3177.             Name:     ls
  3178.  
  3179.             Type:     Builtin
  3180.  
  3181.             Default:  n/a
  3182.  
  3183.             Usage:    ls [ -aldi1bv ] [ dirname | fname ] ...
  3184.  
  3185.             Range:    n/a
  3186.  
  3187.             About:    This command is used to  obtain  information  about
  3188.                       files  or  directories.   With  no  arguments,   it
  3189.                       simply lists the contents of  the  current  working
  3190.                       directory, leaving out files beginning with a  dot.
  3191.                       If the 'I' option to Ash is set  (see  the  options
  3192.                       command), all .info files are also left  out  (this
  3193.                       feature exists because I hate .info files).
  3194.  
  3195.                       The 'a'  option  causes  ls to list files beginning
  3196.                       with a dot.  Similarly, the 'i' option lists  .info
  3197.                       files even if the 'I' option to Ash is set.
  3198.  
  3199.                       The 'l' option creates a  long  format  list,  with
  3200.                       filename,  protection  status,  byte  size,   block
  3201.                       size,  and  modification  date  listed.   (The   ll
  3202.                       command has been aliased to 'ls -l'  to  make  this
  3203.                       easier).  The '1' option  creates  a  short  format
  3204.                       list with one column instead of three  (useful  for
  3205.                       piping filenames into a command).
  3206.  
  3207.                       The 'd' option forces directories to be printed  as
  3208.                       such.   Normally  if  the   ls command is  given  a
  3209.                       directory as an argument, it  prints  the  contents
  3210.                       of  that  directory.    The   'd'   option   prints
  3211.                       information  on  the  directory  itself.   This  is
  3212.                       useful  with   the   'l'   option   to   find   the
  3213.                       modification  date  or  protection  status   of   a
  3214.                       directory.
  3215.  
  3216.                       The 'b' option causes only  the  basename  of  each
  3217.                       file to be printed.  Normally, if a path to a  file
  3218.                       is given, Ash will print the  path  information  in
  3219.                       each  entry  in  the  ls output.   The  'b'  option
  3220.                       leaves out the path information, printing only  the
  3221.                       basename.   The  'v'  option  prints  a  count   of
  3222.                       entries listed after the listing itself.
  3223.  
  3224.             Example:  ls -li my_dir   # list my_dir including info files
  3225.  
  3226.             See Also: options
  3227.  
  3228.           _________________________________________________________________
  3229.  
  3230.  
  3231.           ASH Amiga Shell              Page 49            Reference Manual
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241.           _________________________________________________________________
  3242.  
  3243.             Name:     match
  3244.  
  3245.             Type:     Builtin
  3246.  
  3247.             Default:  n/a
  3248.  
  3249.             Usage:    match [ -v ] pattern [ string ... ]
  3250.  
  3251.             Range:    n/a
  3252.  
  3253.             About:    match prints each string that matches  the  pattern
  3254.                       given in the first argument.   The  pattern  is  of
  3255.                       the same type used by Ash for  filename  wildcards,
  3256.                       but it must be quoted to avoid  being  expanded  in
  3257.                       that manner.  If the 'v' flag is set, only  strings
  3258.                       not matching the pattern are printed.
  3259.  
  3260.             Example:  match '*.[ch]' file1.foo file1.c file2.h my_file
  3261.  
  3262.             See Also:
  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.           ASH Amiga Shell              Page 50            Reference Manual
  3298.  
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.  
  3305.  
  3306.  
  3307.           _________________________________________________________________
  3308.  
  3309.             Name:     mem
  3310.  
  3311.             Type:     Builtin
  3312.  
  3313.             Default:  n/a
  3314.  
  3315.             Usage:    mem [ -tcf ]
  3316.  
  3317.             Range:    n/a
  3318.  
  3319.             About:    mem reports  the  amount  of  free  chip  and  fast
  3320.                       memory, as well as a total.  If  the  't'  flag  is
  3321.                       set, only the total is  printed.   If  the  'c'  is
  3322.                       set, only chip memory is listed,  and  if  the  'f'
  3323.                       flag is set, only fast memory is listed.
  3324.  
  3325.             Example:  if [ $(mem -t ] -lt 400000 ]
  3326.                       then
  3327.                          echo 'you must have at least 400K free'
  3328.                       fi
  3329.  
  3330.             See Also:
  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.           ASH Amiga Shell              Page 51            Reference Manual
  3364.  
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370.  
  3371.  
  3372.  
  3373.           _________________________________________________________________
  3374.  
  3375.             Name:     mkdir
  3376.  
  3377.             Type:     Builtin
  3378.  
  3379.             Default:  n/a
  3380.  
  3381.             Usage:    mkdir [ dirname ... ]
  3382.  
  3383.             Range:    n/a
  3384.  
  3385.             About:    mkdir creates directories with names  identical  to
  3386.                       the parameters passed to it.
  3387.  
  3388.             Example:  mkdir my_dir sys:system/my_other_dir
  3389.  
  3390.             See Also: rmdir
  3391.  
  3392.           _________________________________________________________________
  3393.  
  3394.  
  3395.  
  3396.  
  3397.  
  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.           ASH Amiga Shell              Page 52            Reference Manual
  3430.  
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436.  
  3437.  
  3438.  
  3439.           _________________________________________________________________
  3440.  
  3441.             Name:     mv
  3442.  
  3443.             Type:     Builtin
  3444.  
  3445.             Default:  n/a
  3446.  
  3447.             Usage:    mv file1 file2
  3448.                       mv file | dir [ file | dir ] ... dir
  3449.  
  3450.             Range:    n/a
  3451.  
  3452.             About:    mv moves files or  directories  by  renaming  them.
  3453.                       Thus,  it  cannot  be  used  to  move  data   cross
  3454.                       devices.  If more than one  source  is  given,  the
  3455.                       destination must be a directory,  and  the  sources
  3456.                       have the same names in the  destination  directory.
  3457.                       mv can move files or directories.
  3458.  
  3459.             Example:  mv my_dir sys:another_dir/my_other_dir
  3460.  
  3461.             See Also: cp
  3462.  
  3463.           _________________________________________________________________
  3464.  
  3465.  
  3466.  
  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.           ASH Amiga Shell              Page 53            Reference Manual
  3496.  
  3497.  
  3498.  
  3499.  
  3500.  
  3501.  
  3502.  
  3503.  
  3504.  
  3505.           _________________________________________________________________
  3506.  
  3507.             Name:     OLDPWD
  3508.  
  3509.             Type:     Variable
  3510.  
  3511.             Default:  old present working directory string
  3512.  
  3513.             Usage:    $OLDPWD
  3514.  
  3515.             Range:    n/a
  3516.  
  3517.             About:    When the present working directory is changed,  Ash
  3518.                       puts the old PWD  value  into  OLDPWD.   The  cd -p
  3519.                       command can be used to return to OLDPWD.
  3520.  
  3521.             Example:  echo $PWD; cd c:; echo $OLDPWD
  3522.  
  3523.             See Also: PWD, pwd, cd
  3524.  
  3525.           _________________________________________________________________
  3526.  
  3527.  
  3528.  
  3529.  
  3530.  
  3531.  
  3532.  
  3533.  
  3534.  
  3535.  
  3536.  
  3537.  
  3538.  
  3539.  
  3540.  
  3541.  
  3542.  
  3543.  
  3544.  
  3545.  
  3546.  
  3547.  
  3548.  
  3549.  
  3550.  
  3551.  
  3552.  
  3553.  
  3554.  
  3555.  
  3556.  
  3557.  
  3558.  
  3559.  
  3560.  
  3561.           ASH Amiga Shell              Page 54            Reference Manual
  3562.  
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568.  
  3569.  
  3570.  
  3571.           _________________________________________________________________
  3572.  
  3573.             Name:     options
  3574.  
  3575.             Type:     Builtin
  3576.  
  3577.             Default:  n/a
  3578.  
  3579.             Usage:    options [ -opts | +opts ] ...
  3580.  
  3581.             Range:    n/a
  3582.  
  3583.             About:    The  options command provides a way to  change  the
  3584.                       default behavior of Ash in a number of  areas.   If
  3585.                       the command is entered with no  parameters,  simply
  3586.                       prints the  current  options  string,  which  is  a
  3587.                       series  of  letters  and  digits.   Otherwise,   it
  3588.                       examines each parameter in  turn.   Each  parameter
  3589.                       can begin with a '+' or '-'; a '+' turns  "on"  the
  3590.                       options corresponding each letter, and a '-'  turns
  3591.                       them "off".
  3592.  
  3593.                       +e   If set, disable command  line  editing.   This
  3594.                            might be useful for using Ash from a  terminal
  3595.                            that  does  not  support   the   ANSI   escape
  3596.                            sequences Ash uses  for  line  editing.   Note
  3597.                            that is flag is SET  in  .ashinit.   You  must
  3598.                            reset it in .ashrc if you  wish  to  use  line
  3599.                            editing (the .ashrc  file  supplied  with  Ash
  3600.                            does this).
  3601.  
  3602.                       +f   If set, disable wildcard filename expansion.
  3603.  
  3604.                       +h   If set, always  create  a  new  history  line,
  3605.                            even if  an  old  command  was  executed  with
  3606.                            'history  -e'  or  the   interactive   editing
  3607.                            facility.  If not  set,  executing  old  lines
  3608.                            will not create a new history entry.
  3609.  
  3610.                       +i   If  set,  use  IFS  to  split  $(  )   command
  3611.                            substitution text,  much  as  it  is  used  to
  3612.                            split variable value expansion text.
  3613.  
  3614.                       +l   If set, variables referenced in  functions  or
  3615.                            parenthetical   subshells   will   be    local
  3616.                            (although  this  also  depends  on   the   'n'
  3617.                            option).  If not set, there will be  no  local
  3618.                            variables.  Note that resetting this flag  may
  3619.                            have large side effects when  running  scripts
  3620.                            and  functions.   The  advantage  is  that  it
  3621.                            takes less memory and is faster.
  3622.  
  3623.                       +n   If set, only read scripts, but do not  execute
  3624.                            their   commands.    This   is   ignored   for
  3625.  
  3626.  
  3627.           ASH Amiga Shell              Page 55            Reference Manual
  3628.  
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.  
  3635.  
  3636.  
  3637.                            interactive use.
  3638.  
  3639.                       +p   If set,  use  the  exec  prompt  string  mode.
  3640.                            This tells ash not to use  the  prompt  string
  3641.                            as the prompt directly, but rather to pass  it
  3642.                            through the  command  interpreter  first,  and
  3643.                            use  the  results  as  the  prompt.   This  is
  3644.                            slower, but more powerful.
  3645.  
  3646.                       +s   If  set,   sort   filename   parameters   from
  3647.                            wildcard expansion.
  3648.  
  3649.                       +x   If set, print each lines as  it  is  executed.
  3650.                            Moderately useful for debugging scripts.
  3651.  
  3652.                       +E   If set, the  tab  key  will  expand  filenames
  3653.                            like <esc><esc>.  This is easier to type,  and
  3654.                            closer  to  the  emacs  completion  mechanism.
  3655.                            (This also requires the 'e' option be reset).
  3656.  
  3657.                       +F   If set, map UNIX style filenames  to  AmigaDos
  3658.                            style file names.  A  leading  '/'  becomes  a
  3659.                            ':', a '~' inserts the contents  of  the  HOME
  3660.                            variable,   a   '.'   becomes   the    current
  3661.                            directory, and two dots become a slash.
  3662.  
  3663.                       +I   If  set,  leave  out  the  .info  files   from
  3664.                            directory listings unless the  'i'  option  to
  3665.                            'ls' is explicitly set.
  3666.  
  3667.                       +N   Create  new  variables  in   a   subshell   or
  3668.                            function only if  a  variable  with  the  same
  3669.                            name does not exist in an outer  context.   If
  3670.                            one does exist, that one will be used  instead
  3671.                            of making a new  local  variable.   This  flag
  3672.                            changes the scoping  rules,  and  can  have  a
  3673.                            large effect in the execution of  scripts  and
  3674.                            functions; it should be used with care.
  3675.  
  3676.                       +S   Insert a single blank line  before  and  after
  3677.                            the    prompt     when     typing     commands
  3678.                            interactively.  For  interlace  screens  where
  3679.                            more than 36 or so lines are displayed,  using
  3680.                            the  S  option  can  create  a  more  visually
  3681.                            appealing and "tidy" display.
  3682.  
  3683.             Example:  # reset all options
  3684.                       options $(echo -c - '-' $(options))
  3685.  
  3686.             See Also:
  3687.  
  3688.           _________________________________________________________________
  3689.  
  3690.  
  3691.  
  3692.  
  3693.           ASH Amiga Shell              Page 56            Reference Manual
  3694.  
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.  
  3701.  
  3702.  
  3703.           _________________________________________________________________
  3704.  
  3705.             Name:     PATH
  3706.  
  3707.             Type:     Variable
  3708.  
  3709.             Default:  '.,c:'
  3710.  
  3711.             Usage:    $PATH
  3712.  
  3713.             Range:    n/a
  3714.  
  3715.             About:    This variable contains a comma  separated  list  of
  3716.                       directory names.  When  Ash  executes  a  file,  it
  3717.                       searches for it in these  directories.   Note  that
  3718.                       the current working  directory  must  be  specified
  3719.                       explicitly (".").  This lets you change  the  order
  3720.                       of the search.  For example, you could move "."  to
  3721.                       the end  of  the  path  to  search  it  last.   The
  3722.                       directory names in the  path  do  not  need  to  be
  3723.                       terminated by a slash; Ash will add one  if  it  is
  3724.                       not there.
  3725.  
  3726.                       If Ash finds the file name in the search path,  and
  3727.                       the file has its script bit set, Ash  will  attempt
  3728.                       to execute this file  as  a  script  instead  of  a
  3729.                       binary.
  3730.  
  3731.                       The PATH variable is also  used  by  the  which and
  3732.                       whence commands.
  3733.  
  3734.             Example:  c:run $(which emacs) my_file
  3735.  
  3736.             See Also: path, which, whence
  3737.  
  3738.           _________________________________________________________________
  3739.  
  3740.  
  3741.  
  3742.  
  3743.  
  3744.  
  3745.  
  3746.  
  3747.  
  3748.  
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.  
  3758.  
  3759.           ASH Amiga Shell              Page 57            Reference Manual
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.  
  3767.  
  3768.  
  3769.           _________________________________________________________________
  3770.  
  3771.             Name:     path
  3772.  
  3773.             Type:     Function
  3774.  
  3775.             Default:  see the .ashinit file
  3776.  
  3777.             Usage:    path
  3778.                       path name
  3779.                       path -add [ name ... ]
  3780.  
  3781.             Range:    n/a
  3782.  
  3783.             About:    This  function  is  provided  to  make   the   PATH
  3784.                       variable easier to set up and manipulate.
  3785.  
  3786.                       With no  arguments,  path simply prints the current
  3787.                       path definition.
  3788.  
  3789.                       The second form above sets  the  path  variable  to
  3790.                       name.
  3791.  
  3792.                       The third form above adds each  name  to  the  path
  3793.                       variable  list,  provided  that  it  is  not  there
  3794.                       already.  If the name is  already  a  component  of
  3795.                       the path, it is ignored.
  3796.  
  3797.             Example:  path -add sys:bin sys:pd/bin
  3798.  
  3799.             See Also: PATH
  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.           ASH Amiga Shell              Page 58            Reference Manual
  3826.  
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.  
  3833.  
  3834.  
  3835.           _________________________________________________________________
  3836.  
  3837.             Name:     PNPC
  3838.  
  3839.             Type:     Variable
  3840.  
  3841.             Default:  21
  3842.  
  3843.             Usage:    $PNPC
  3844.  
  3845.             Range:    0 to 63
  3846.  
  3847.             About:    This variable is one  of  several  responsible  for
  3848.                       controlling the actions of  Ash  line  editing  and
  3849.                       display output.   PNPC  tells  Ash  how  many  non-
  3850.                       printing  control  characters  there  are  in   the
  3851.                       currently defined  prompt  strings  (both  PS1  and
  3852.                       PS2).  Ash needs to know this so that it  can  find
  3853.                       the actual printing  width  of  the  prompt  string
  3854.                       from the actual character length.   You  will  only
  3855.                       have to change PNPC if you  change  the  number  of
  3856.                       ANSI control sequences in your prompt.
  3857.  
  3858.             Example:  PNPC=0
  3859.  
  3860.             See Also: COLUMNS, PS1, PS2, options
  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.           ASH Amiga Shell              Page 59            Reference Manual
  3892.  
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898.  
  3899.  
  3900.  
  3901.           _________________________________________________________________
  3902.  
  3903.             Name:     ps
  3904.  
  3905.             Type:     Builtin
  3906.  
  3907.             Default:  n/a
  3908.  
  3909.             Usage:    ps
  3910.  
  3911.             Range:    n/a
  3912.  
  3913.             About:    ps  prints,  for  each  CLI  process,  the  process
  3914.                       number, the address of the  process,  the  priority
  3915.                       of the process, the command  name  associated  with
  3916.                       the process, and the current working directory  for
  3917.                       the process.
  3918.  
  3919.             Example:  ps
  3920.  
  3921.             See Also:
  3922.  
  3923.           _________________________________________________________________
  3924.  
  3925.  
  3926.  
  3927.  
  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.           ASH Amiga Shell              Page 60            Reference Manual
  3958.  
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964.  
  3965.  
  3966.  
  3967.           _________________________________________________________________
  3968.  
  3969.             Name:     PS1
  3970.  
  3971.             Type:     Variable
  3972.  
  3973.             Default:  '$_ANSI_P3[$PWD]: $_ANSI_P1'
  3974.  
  3975.             Usage:    $PS1
  3976.  
  3977.             Range:    n/a
  3978.  
  3979.             About:    This variable controls the  primary  prompt  string
  3980.                       displayed by Ash.  If the 'p'  Ash  option  is  not
  3981.                       set (see options), Ash  expands  the  variables  in
  3982.                       the string, and outputs it as the  primary  prompt.
  3983.                       For this reason, PS1 should be defined to a  single
  3984.                       quoted string, so that the variables  are  expanded
  3985.                       at the proper time and not when PS1 is defined.
  3986.  
  3987.                       If the 'p' option to Ash  is  set,  Ash  sends  the
  3988.                       contents of the PS1 variable  through  the  command
  3989.                       interpreter,  and  displays  the  result   as   the
  3990.                       primary prompt.  In this case, PS1  should  contain
  3991.                       a  string  which  when  executed,  will  print  the
  3992.                       desired prompt.  This is slower  than  the  default
  3993.                       method above.
  3994.  
  3995.             Example:  PS1='$ '; PNPC=0
  3996.  
  3997.             See Also: PS2, PNPC, options
  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.           ASH Amiga Shell              Page 61            Reference Manual
  4024.  
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030.  
  4031.  
  4032.  
  4033.           _________________________________________________________________
  4034.  
  4035.             Name:     PS2
  4036.  
  4037.             Type:     Variable
  4038.  
  4039.             Default:  '$_ANSI_P3> $_ANSI_P1'
  4040.  
  4041.             Usage:    $PS2
  4042.  
  4043.             Range:    n/a
  4044.  
  4045.             About:    This variable controls the secondary prompt  string
  4046.                       displayed  by  Ash.   This  is  the  prompt  string
  4047.                       displayed when Ash expects more input, such as  the
  4048.                       continuation of a  for  statement  or  unterminated
  4049.                       string.
  4050.  
  4051.                       If the 'p' Ash option is  not  set  (see  options),
  4052.                       Ash  expands  the  variables  in  the  string,  and
  4053.                       outputs it  as  the  secondary  prompt.   For  this
  4054.                       reason, PS2 should be defined to  a  single  quoted
  4055.                       string, so that the variables are expanded  at  the
  4056.                       proper time and not when PS2 is defined.
  4057.  
  4058.                       If the 'p' option to Ash  is  set,  Ash  sends  the
  4059.                       contents of the PS2 variable  through  the  command
  4060.                       interpreter,  and  displays  the  result   as   the
  4061.                       secondary  prompt.   In  this  case,   PS2   should
  4062.                       contain a string which when  executed,  will  print
  4063.                       the  desired  prompt.   This  is  slower  than  the
  4064.                       default method above.
  4065.  
  4066.             Example:  PS2=': '; PNPC=0
  4067.  
  4068.             See Also: PS1, PNPC, options
  4069.  
  4070.           _________________________________________________________________
  4071.  
  4072.  
  4073.  
  4074.  
  4075.  
  4076.  
  4077.  
  4078.  
  4079.  
  4080.  
  4081.  
  4082.  
  4083.  
  4084.  
  4085.  
  4086.  
  4087.  
  4088.  
  4089.           ASH Amiga Shell              Page 62            Reference Manual
  4090.  
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096.  
  4097.  
  4098.  
  4099.           _________________________________________________________________
  4100.  
  4101.             Name:     PWD
  4102.  
  4103.             Type:     Variable
  4104.  
  4105.             Default:  present working directory string
  4106.  
  4107.             Usage:    $PWD
  4108.  
  4109.             Range:    n/a
  4110.  
  4111.             About:    Ash maintains the contents of  this  variable  such
  4112.                       that  it  always  represents  the  current  working
  4113.                       directory.
  4114.  
  4115.             Example:  old_dir="$PWD";    # save old directory
  4116.  
  4117.             See Also: OLDPWD, pwd, cd
  4118.  
  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.           ASH Amiga Shell              Page 63            Reference Manual
  4156.  
  4157.  
  4158.  
  4159.  
  4160.  
  4161.  
  4162.  
  4163.  
  4164.  
  4165.           _________________________________________________________________
  4166.  
  4167.             Name:     pwd
  4168.  
  4169.             Type:     Alias
  4170.  
  4171.             Default:  echo "$PWD"
  4172.  
  4173.             Usage:    pwd
  4174.  
  4175.             Range:    n/a
  4176.  
  4177.             About:    This  alias  simply  prints  the  present   working
  4178.                       directory string.
  4179.  
  4180.             Example:  pwd
  4181.  
  4182.             See Also: PWD, OLDPWD
  4183.  
  4184.           _________________________________________________________________
  4185.  
  4186.  
  4187.  
  4188.  
  4189.  
  4190.  
  4191.  
  4192.  
  4193.  
  4194.  
  4195.  
  4196.  
  4197.  
  4198.  
  4199.  
  4200.  
  4201.  
  4202.  
  4203.  
  4204.  
  4205.  
  4206.  
  4207.  
  4208.  
  4209.  
  4210.  
  4211.  
  4212.  
  4213.  
  4214.  
  4215.  
  4216.  
  4217.  
  4218.  
  4219.  
  4220.  
  4221.           ASH Amiga Shell              Page 64            Reference Manual
  4222.  
  4223.  
  4224.  
  4225.  
  4226.  
  4227.  
  4228.  
  4229.  
  4230.  
  4231.           _________________________________________________________________
  4232.  
  4233.             Name:     read
  4234.  
  4235.             Type:     Builtin
  4236.  
  4237.             Default:  n/a
  4238.  
  4239.             Usage:    read var
  4240.  
  4241.             Range:    n/a
  4242.  
  4243.             About:    The  read command sets the value of the variable by
  4244.                       reading  exactly  one  command  from  the  standard
  4245.                       input.  This can be used to accept input  from  the
  4246.                       keyboard, or it can have  its  own  standard  input
  4247.                       redirected  to  read  lines  from  a  file.    Read
  4248.                       returns a non-zero return code when  it  encounters
  4249.                       an end-of-file; this is useful in loops.
  4250.  
  4251.             Example:  while read in_line
  4252.                       do
  4253.                          echo "We read: $in_line"
  4254.                       done < my_input_file.txt
  4255.  
  4256.             See Also:
  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.           ASH Amiga Shell              Page 65            Reference Manual
  4288.  
  4289.  
  4290.  
  4291.  
  4292.  
  4293.  
  4294.  
  4295.  
  4296.  
  4297.           _________________________________________________________________
  4298.  
  4299.             Name:     return
  4300.  
  4301.             Type:     Builtin
  4302.  
  4303.             Default:  n/a
  4304.  
  4305.             Usage:    return [ num ]
  4306.  
  4307.             Range:    n/a
  4308.  
  4309.             About:    The  return command exits from an enclosing script,
  4310.                       subshell,  or  function.   If   given   a   numeric
  4311.                       argument, it exits from the nth  enclosing  script,
  4312.                       subshell, or function.
  4313.  
  4314.             Example:  ( echo foo; return; echo 'This is not echoed' )
  4315.  
  4316.             See Also: continue, break
  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.           ASH Amiga Shell              Page 66            Reference Manual
  4354.  
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360.  
  4361.  
  4362.  
  4363.           _________________________________________________________________
  4364.  
  4365.             Name:     rm
  4366.  
  4367.             Type:     Builtin
  4368.  
  4369.             Default:  n/a
  4370.  
  4371.             Usage:    rm [ file ... ]
  4372.  
  4373.             Range:    n/a
  4374.  
  4375.             About:    This command simply removes the  named  files.   It
  4376.                       will not remove directories; use rmdir for that.
  4377.  
  4378.             Example:  rm scrap_file.c
  4379.  
  4380.             See Also: rmdir
  4381.  
  4382.           _________________________________________________________________
  4383.  
  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.           ASH Amiga Shell              Page 67            Reference Manual
  4420.  
  4421.  
  4422.  
  4423.  
  4424.  
  4425.  
  4426.  
  4427.  
  4428.  
  4429.           _________________________________________________________________
  4430.  
  4431.             Name:     rmdir
  4432.  
  4433.             Type:     Builtin
  4434.  
  4435.             Default:  n/a
  4436.  
  4437.             Usage:    rmdir [ dir ... ]
  4438.  
  4439.             Range:    n/a
  4440.  
  4441.             About:    This command simply removes the named  directories.
  4442.                       It will not remove files or directories  which  are
  4443.                       not empty.
  4444.  
  4445.             Example:  rmdir scrap_dir
  4446.  
  4447.             See Also: rmdir
  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.           ASH Amiga Shell              Page 68            Reference Manual
  4486.  
  4487.  
  4488.  
  4489.  
  4490.  
  4491.  
  4492.  
  4493.  
  4494.  
  4495.           _________________________________________________________________
  4496.  
  4497.             Name:     set
  4498.  
  4499.             Type:     Builtin
  4500.  
  4501.             Default:  n/a
  4502.  
  4503.             Usage:    set [ -fabvs ] [ pattern ... ]
  4504.  
  4505.             Range:    n/a
  4506.  
  4507.             About:    With  no  options,  set lists each variable and its
  4508.                       definition.  If  pattern  arguments,  each  one  is
  4509.                       listed.  The 'f' options forces  interpretation  as
  4510.                       function names, the 'a' option as alias names,  the
  4511.                       'b' option as builtin command names,  and  the  'v'
  4512.                       option as variables names (the default).
  4513.  
  4514.                       The 's' option leaves out the definition,  printing
  4515.                       only the name on  a  single  line.   In  any  case,
  4516.                       function  definitions  are  not  listed   in   this
  4517.                       version of Ash.  If the 's'  option  is  used,  the
  4518.                       'v'  option  must  explicitly  be   set   to   list
  4519.                       variables.  Also, more than one of 'f',  'a',  'b',
  4520.                       and 'v' may be set.
  4521.  
  4522.                       Ash will not list any function, alias, builtin,  or
  4523.                       variable  whose  name  begins  with  an  underscore
  4524.                       (hidden variables, etc).  This is useful to  either
  4525.                       hide definitions from  users,  or  in  cases  where
  4526.                       printing the contents of a variable  would  corrupt
  4527.                       the display (such as the _ANSI_CLEAR variable).
  4528.  
  4529.                       The definition of builtin commands is printed as  a
  4530.                       short description of the command.
  4531.  
  4532.                       The  set command cannot be used to  set  variables,
  4533.                       as in csh.  Use the assignment operator  ('=')  for
  4534.                       that.
  4535.  
  4536.             Example:  set -b '[a-d]*'
  4537.  
  4538.             See Also: unset
  4539.  
  4540.           _________________________________________________________________
  4541.  
  4542.  
  4543.  
  4544.  
  4545.  
  4546.  
  4547.  
  4548.  
  4549.  
  4550.  
  4551.           ASH Amiga Shell              Page 69            Reference Manual
  4552.  
  4553.  
  4554.  
  4555.  
  4556.  
  4557.  
  4558.  
  4559.  
  4560.  
  4561.           _________________________________________________________________
  4562.  
  4563.             Name:     SHELL
  4564.  
  4565.             Type:     Variable
  4566.  
  4567.             Default:  ash
  4568.  
  4569.             Usage:    $SHELL
  4570.  
  4571.             Range:    n/a
  4572.  
  4573.             About:    This variable is set by Ash to  the  string  "ash".
  4574.                       It can be used to  test  which  shell  is  running,
  4575.                       provided that the alternate  shell  has  a  similar
  4576.                       syntax.
  4577.  
  4578.             Example:  if [ "$ash" != 'ash' ]
  4579.                       then
  4580.                           echo "This runs only under Ash!"
  4581.                       fi
  4582.  
  4583.             See Also: SYSNAME
  4584.  
  4585.           _________________________________________________________________
  4586.  
  4587.  
  4588.  
  4589.  
  4590.  
  4591.  
  4592.  
  4593.  
  4594.  
  4595.  
  4596.  
  4597.  
  4598.  
  4599.  
  4600.  
  4601.  
  4602.  
  4603.  
  4604.  
  4605.  
  4606.  
  4607.  
  4608.  
  4609.  
  4610.  
  4611.  
  4612.  
  4613.  
  4614.  
  4615.  
  4616.  
  4617.           ASH Amiga Shell              Page 70            Reference Manual
  4618.  
  4619.  
  4620.  
  4621.  
  4622.  
  4623.  
  4624.  
  4625.  
  4626.  
  4627.           _________________________________________________________________
  4628.  
  4629.             Name:     shift
  4630.  
  4631.             Type:     Builtin
  4632.  
  4633.             Default:  n/a
  4634.  
  4635.             Usage:    shift [ num ]
  4636.  
  4637.             Range:    n/a
  4638.  
  4639.             About:    This  command  is  used  inside   of   scripts   or
  4640.                       functions to shift the parametric  arguments.   For
  4641.                       example, if $1 = 'foo' and  $2  =  'bar',  after  a
  4642.                       shift, $1 would be 'bar' and $2 would not  be  set.
  4643.                       The '$#'  and  '$*'  variables  are  also  modified
  4644.                       appropriately.   If  shift  is  given   a   numeric
  4645.                       parameter,  it  acts  as  though  num   consecutive
  4646.                       shifts took place.
  4647.  
  4648.             Example:  function my_func {
  4649.                          echo "$2, $#"
  4650.                          shift
  4651.                          echo "$2, $#"
  4652.                       }
  4653.  
  4654.             See Also: function
  4655.  
  4656.           _________________________________________________________________
  4657.  
  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.           ASH Amiga Shell              Page 71            Reference Manual
  4684.  
  4685.  
  4686.  
  4687.  
  4688.  
  4689.  
  4690.  
  4691.  
  4692.  
  4693.           _________________________________________________________________
  4694.  
  4695.             Name:     sleep
  4696.  
  4697.             Type:     Builtin
  4698.  
  4699.             Default:  n/a
  4700.  
  4701.             Usage:    sleep n
  4702.  
  4703.             Range:    n/a
  4704.  
  4705.             About:    Sleep  delays  execution  for  n seconds.  If  n is
  4706.                       omitted, zero, or negative, the  command  does  not
  4707.                       pause.  Sleep takes  virtually  no  CPU  time.   It
  4708.                       will wake up once  per  second  to  check  for  the
  4709.                       break key.  Sleep is not guaranteed to be  a  delay
  4710.                       of  exactly  n seconds; it may be more on a  loaded
  4711.                       system,  or  if  Ash  is  preempted  by  a   higher
  4712.                       priority process.  It is,  however,  guaranteed  to
  4713.                       be a delay of at least n seconds.
  4714.  
  4715.             Example:  time sleep 5
  4716.  
  4717.             See Also: time
  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.           ASH Amiga Shell              Page 72            Reference Manual
  4750.  
  4751.  
  4752.  
  4753.  
  4754.  
  4755.  
  4756.  
  4757.  
  4758.  
  4759.           _________________________________________________________________
  4760.  
  4761.             Name:     source
  4762.  
  4763.             Type:     Builtin
  4764.  
  4765.             Default:  n/a
  4766.  
  4767.             Usage:    source [ file ... ]
  4768.  
  4769.             Range:    n/a
  4770.  
  4771.             About:    This  command  "sources" the named files; that  is,
  4772.                       they are executed, but not in a subshell,  so  that
  4773.                       any variables, alias, etc,  that  they  define  are
  4774.                       really defined in the parent's environment.
  4775.  
  4776.                       A single dot ('.') may be used to source a file  as
  4777.                       well; this is compatible with ksh and sh.
  4778.  
  4779.                       A file which is sourced does not have to  have  its
  4780.                       script bit set (although it won't hurt).   However,
  4781.                       a script file which is to  be  executed  by  typing
  4782.                       its name must have its script bit set.
  4783.  
  4784.                       Executing a file is equivalent to:
  4785.  
  4786.                          ( source file )
  4787.  
  4788.             Example:  source my_init_file.ash
  4789.  
  4790.             See Also:
  4791.  
  4792.           _________________________________________________________________
  4793.  
  4794.  
  4795.  
  4796.  
  4797.  
  4798.  
  4799.  
  4800.  
  4801.  
  4802.  
  4803.  
  4804.  
  4805.  
  4806.  
  4807.  
  4808.  
  4809.  
  4810.  
  4811.  
  4812.  
  4813.  
  4814.  
  4815.           ASH Amiga Shell              Page 73            Reference Manual
  4816.  
  4817.  
  4818.  
  4819.  
  4820.  
  4821.  
  4822.  
  4823.  
  4824.  
  4825.           _________________________________________________________________
  4826.  
  4827.             Name:     stack
  4828.  
  4829.             Type:     Function
  4830.  
  4831.             Default:  see the .ashinit file
  4832.  
  4833.             Usage:    stack
  4834.                       stack size
  4835.  
  4836.             Range:    4000 <= size <= 128000
  4837.  
  4838.             About:    This function is provided to set or examine the  stack
  4839.                       size.  With no arguments, it prints the current  stack
  4840.                       size using c:stack.  With one argument,  it  sets  the
  4841.                       stack size to 12000 bytes plus the argument.  This  is
  4842.                       necessary because Ash itself requires 12000  bytes  of
  4843.                       memory, and executed programs require their  stack  in
  4844.                       addition to this.
  4845.  
  4846.             Example:  stack 16000
  4847.  
  4848.             See Also:
  4849.  
  4850.           _________________________________________________________________
  4851.  
  4852.  
  4853.  
  4854.  
  4855.  
  4856.  
  4857.  
  4858.  
  4859.  
  4860.  
  4861.  
  4862.  
  4863.  
  4864.  
  4865.  
  4866.  
  4867.  
  4868.  
  4869.  
  4870.  
  4871.  
  4872.  
  4873.  
  4874.  
  4875.  
  4876.  
  4877.  
  4878.  
  4879.  
  4880.  
  4881.           ASH Amiga Shell              Page 74            Reference Manual
  4882.  
  4883.  
  4884.  
  4885.  
  4886.  
  4887.  
  4888.  
  4889.  
  4890.  
  4891.           _________________________________________________________________
  4892.  
  4893.             Name:     strings
  4894.  
  4895.             Type:     External Command
  4896.  
  4897.             Default:  n/a
  4898.  
  4899.             Usage:    strings [ -num ] [ file ... ]
  4900.  
  4901.             Range:    0 <= num
  4902.  
  4903.             About:    strings searches the named files for strings of  at
  4904.                       least  num consecutive  printable  characters.   If
  4905.                       found,  it  prints  them.   If   num is not set, it
  4906.                       defaults to 6.
  4907.  
  4908.             Example:  strings -10 my_file.o binary_file
  4909.  
  4910.             See Also:
  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.           ASH Amiga Shell              Page 75            Reference Manual
  4948.  
  4949.  
  4950.  
  4951.  
  4952.  
  4953.  
  4954.  
  4955.  
  4956.  
  4957.           _________________________________________________________________
  4958.  
  4959.             Name:     SYSNAME
  4960.  
  4961.             Type:     Variable
  4962.  
  4963.             Default:  'Amiga'
  4964.  
  4965.             Usage:    $SYSNAME
  4966.  
  4967.             Range:    n/a
  4968.  
  4969.             About:    This variable describes the system on which Ash  is
  4970.                       currently being run.  There is currently  only  one
  4971.                       version of  Ash,  so  this  variable  will  contain
  4972.                       "Amiga".  If Ash is ported to other  systems,  this
  4973.                       variable can be used to determine the name  of  the
  4974.                       system.
  4975.  
  4976.             Example:  if [ "$SYSNAME" != 'Amiga' ]
  4977.                       then
  4978.                          echo "This script runs only on Amigas."
  4979.                       fi
  4980.  
  4981.             See Also: SHELL
  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.           ASH Amiga Shell              Page 76            Reference Manual
  5014.  
  5015.  
  5016.  
  5017.  
  5018.  
  5019.  
  5020.  
  5021.  
  5022.  
  5023.           _________________________________________________________________
  5024.  
  5025.             Name:     tail
  5026.  
  5027.             Type:     External Command
  5028.  
  5029.             Default:  n/a
  5030.  
  5031.             Usage:    tail [ -num | +num ] [ file ... ]
  5032.  
  5033.             Range:    0 <= num <= 1024
  5034.  
  5035.             About:    tail prints the last  num lines of each named file,
  5036.                       or the standard input if no files are named.  If  a
  5037.                       '+'  precedes  num instead of a  '-',  tail instead
  5038.                       skips num lines and prints the rest of the file.
  5039.  
  5040.                       Since  tail uses a temporary ram  buffer  to  store
  5041.                       lines,  num is limited to 1024.  If num is set to a
  5042.                       larger number, it will  be  silently  truncated  to
  5043.                       1024.
  5044.  
  5045.             Example:  tail -15 my_file.c my_other_file.c
  5046.  
  5047.             See Also: head
  5048.  
  5049.           _________________________________________________________________
  5050.  
  5051.  
  5052.  
  5053.  
  5054.  
  5055.  
  5056.  
  5057.  
  5058.  
  5059.  
  5060.  
  5061.  
  5062.  
  5063.  
  5064.  
  5065.  
  5066.  
  5067.  
  5068.  
  5069.  
  5070.  
  5071.  
  5072.  
  5073.  
  5074.  
  5075.  
  5076.  
  5077.  
  5078.  
  5079.           ASH Amiga Shell              Page 77            Reference Manual
  5080.  
  5081.  
  5082.  
  5083.  
  5084.  
  5085.  
  5086.  
  5087.  
  5088.  
  5089.           _________________________________________________________________
  5090.  
  5091.             Name:     time
  5092.  
  5093.             Type:     Keyword
  5094.  
  5095.             Default:  n/a
  5096.  
  5097.             Usage:    time statement
  5098.  
  5099.             Range:    n/a
  5100.  
  5101.             About:    time  executes  the  statement   and   prints   the
  5102.                       execution time in seconds.
  5103.  
  5104.             Example:  time ( dir; sleep 2 )
  5105.  
  5106.             See Also:
  5107.  
  5108.           _________________________________________________________________
  5109.  
  5110.  
  5111.  
  5112.  
  5113.  
  5114.  
  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.           ASH Amiga Shell              Page 78            Reference Manual
  5146.  
  5147.  
  5148.  
  5149.  
  5150.  
  5151.  
  5152.  
  5153.  
  5154.  
  5155.           _________________________________________________________________
  5156.  
  5157.             Name:     true
  5158.  
  5159.             Type:     Builtin
  5160.  
  5161.             Default:  n/a
  5162.  
  5163.             Usage:    true
  5164.  
  5165.             Range:    n/a
  5166.  
  5167.             About:    true simply returns a  true  exit  code,  and  does
  5168.                       nothing else.
  5169.  
  5170.             Example:  while true
  5171.                       do
  5172.                          echo 'repeat forever!'
  5173.                          sleep 1
  5174.                       done
  5175.  
  5176.             See Also: false
  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.           ASH Amiga Shell              Page 79            Reference Manual
  5212.  
  5213.  
  5214.  
  5215.  
  5216.  
  5217.  
  5218.  
  5219.  
  5220.  
  5221.           _________________________________________________________________
  5222.  
  5223.             Name:     unalias
  5224.  
  5225.             Type:     Alias
  5226.  
  5227.             Default:  unset -a
  5228.  
  5229.             Usage:    unalias [ name ... ]
  5230.  
  5231.             Range:    n/a
  5232.  
  5233.             About:    This  alias  removes  existing  aliases  from   the
  5234.                       current  context.   If  no  names  are  given,  the
  5235.                       command  has  no  effect.   Otherwise,  each  alias
  5236.                       listed is removed, if it was in fact an alias.
  5237.  
  5238.                       Ash supplied aliases may be removed,  but  this  is
  5239.                       not recommended.
  5240.  
  5241.             Example:  unalias my_alias my_other_alias
  5242.  
  5243.             See Also: unset
  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.           ASH Amiga Shell              Page 80            Reference Manual
  5278.  
  5279.  
  5280.  
  5281.  
  5282.  
  5283.  
  5284.  
  5285.  
  5286.  
  5287.           _________________________________________________________________
  5288.  
  5289.             Name:     unfunc
  5290.  
  5291.             Type:     Alias
  5292.  
  5293.             Default:  unset -f
  5294.  
  5295.             Usage:    unfunc [ name ... ]
  5296.  
  5297.             Range:    n/a
  5298.  
  5299.             About:    This alias  removes  existing  functions  from  the
  5300.                       current  context.   If  no  names  are  given,  the
  5301.                       command has no effect.   Otherwise,  each  function
  5302.                       listed is removed, if it was in fact an function.
  5303.  
  5304.                       Ash supplied functions may be removed, but this  is
  5305.                       not recommended.
  5306.  
  5307.             Example:  function my_function my_other_function
  5308.  
  5309.             See Also: unset
  5310.  
  5311.           _________________________________________________________________
  5312.  
  5313.  
  5314.  
  5315.  
  5316.  
  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.           ASH Amiga Shell              Page 81            Reference Manual
  5344.  
  5345.  
  5346.  
  5347.  
  5348.  
  5349.  
  5350.  
  5351.  
  5352.  
  5353.           _________________________________________________________________
  5354.  
  5355.             Name:     unset
  5356.  
  5357.             Type:     Builtin
  5358.  
  5359.             Default:  n/a
  5360.  
  5361.             Usage:    unset [ -fav ] [ name ... ] 
  5362.  
  5363.             Range:    n/a
  5364.  
  5365.             About:    This command removes the definition  of  functions,
  5366.                       aliases, or variables (controlled by the f,  a,  or
  5367.                       v flags).  If no flag is given, the default  is  to
  5368.                       remove variable definitions.
  5369.  
  5370.             Example:  unset -f my_func1 my_func2
  5371.  
  5372.             See Also: unfunc, unalias
  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.           ASH Amiga Shell              Page 82            Reference Manual
  5410.  
  5411.  
  5412.  
  5413.  
  5414.  
  5415.  
  5416.  
  5417.  
  5418.  
  5419.           _________________________________________________________________
  5420.  
  5421.             Name:     variables
  5422.  
  5423.             Type:     Alias
  5424.  
  5425.             Default:  set -v
  5426.  
  5427.             Usage:    variables [-s] [pattern]
  5428.  
  5429.             Range:    n/a
  5430.  
  5431.             About:    This alias lists defined  variables.   The  pattern
  5432.                       uses normal wildcards, but must be quoted to  avoid
  5433.                       being  interpreted  by   the   filename   expansion
  5434.                       mechanism.   If  the  pattern   is   omitted,   all
  5435.                       variables are listed except  those  beginning  with
  5436.                       an underscore character  (hidden  variables).   For
  5437.                       example, _ANSI_P1 is a hidden variable; if  it  was
  5438.                       printed in the normal variable  list,  the  display
  5439.                       pen would be changed.
  5440.  
  5441.                       Only variables for the current context are  listed,
  5442.                       so this command may have a different effect  inside
  5443.                       of  a  subshell  or  function   than   when   typed
  5444.                       manually.
  5445.  
  5446.             Example:  variables -s '[A-H]*'
  5447.  
  5448.             See Also: set
  5449.  
  5450.           _________________________________________________________________
  5451.  
  5452.  
  5453.  
  5454.  
  5455.  
  5456.  
  5457.  
  5458.  
  5459.  
  5460.  
  5461.  
  5462.  
  5463.  
  5464.  
  5465.  
  5466.  
  5467.  
  5468.  
  5469.  
  5470.  
  5471.  
  5472.  
  5473.  
  5474.  
  5475.           ASH Amiga Shell              Page 83            Reference Manual
  5476.  
  5477.  
  5478.  
  5479.  
  5480.  
  5481.  
  5482.  
  5483.  
  5484.  
  5485.           _________________________________________________________________
  5486.  
  5487.             Name:     version
  5488.  
  5489.             Type:     Builtin
  5490.  
  5491.             Default:  n/a
  5492.  
  5493.             Usage:    version [ -ds ]
  5494.  
  5495.             Range:    n/a
  5496.  
  5497.             About:    version with no  options  prints  the  Ash  version
  5498.                       string  and  copyright  notice.   The  'd'   option
  5499.                       echoes the compile date of Ash, and the 's'  option
  5500.                       prints  a  single  numeric  value  that   will   be
  5501.                       incremented for  each  release  of  Ash.   This  is
  5502.                       useful in tests, as below.
  5503.  
  5504.             Example:  if [ $(version -s) -lt 3 ]
  5505.                       then
  5506.                          echo 'This script requires a later Ash version'
  5507.                       fi
  5508.  
  5509.             See Also:
  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.           ASH Amiga Shell              Page 84            Reference Manual
  5542.  
  5543.  
  5544.  
  5545.  
  5546.  
  5547.  
  5548.  
  5549.  
  5550.  
  5551.           _________________________________________________________________
  5552.  
  5553.             Name:     wc
  5554.  
  5555.             Type:     External Command
  5556.  
  5557.             Default:  n/a
  5558.  
  5559.             Usage:    wc [ -hcwlqt ] [ file ... ]
  5560.  
  5561.             Range:    n/a
  5562.  
  5563.             About:    wc is a utility which counts characters, words,  or
  5564.                       lines in a given series of files (or  the  standard
  5565.                       input, if no files  are  indicated).   It  normally
  5566.                       produces information on all three counts,  preceded
  5567.                       by a title for each column.  If  the  c,  w,  or  l
  5568.                       flags are  set,  only  information  on  characters,
  5569.                       words,  or  lines  is  printed.   (These   can   be
  5570.                       combined; for example 'wc -cl').  If the q flag  is
  5571.                       set,  wc does its work quietly; that is, it  leaves
  5572.                       out titles  and  file  names,  only  reporting  the
  5573.                       actual counts.  The t flag can be used to obtain  a
  5574.                       total at the end, and the h flag prints  a  helpful
  5575.                       usage message.
  5576.  
  5577.             Example:  if [ $(wc -lq my_file) -lt 10 ]
  5578.                       then
  5579.                          echo "There must be at least 10 lines"
  5580.                       fi
  5581.  
  5582.             See Also:
  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.           ASH Amiga Shell              Page 85            Reference Manual
  5608.  
  5609.  
  5610.  
  5611.  
  5612.  
  5613.  
  5614.  
  5615.  
  5616.  
  5617.           _________________________________________________________________
  5618.  
  5619.             Name:     whence
  5620.  
  5621.             Type:     Builtin
  5622.  
  5623.             Default:  n/a
  5624.  
  5625.             Usage:    whence [ name ... ]
  5626.  
  5627.             Range:    n/a
  5628.  
  5629.             About:    whence reports how each name would  be  interpreted
  5630.                       if it was  used  as  a  command.   It  will  report
  5631.                       whether the name will be interpreted as  a  builtin
  5632.                       command, an  alias,  a  function,  or  an  external
  5633.                       statement.  If the command  is  interpreted  as  an
  5634.                       external  statement,  a  path  to  the  command  is
  5635.                       printed.
  5636.  
  5637.             Example:  whence whence if path ll
  5638.  
  5639.             See Also: which
  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.           ASH Amiga Shell              Page 86            Reference Manual
  5674.  
  5675.  
  5676.  
  5677.  
  5678.  
  5679.  
  5680.  
  5681.  
  5682.  
  5683.           _________________________________________________________________
  5684.  
  5685.             Name:     which
  5686.  
  5687.             Type:     Builtin
  5688.  
  5689.             Default:  n/a
  5690.  
  5691.             Usage:    which [ name ... ]
  5692.  
  5693.             Range:    n/a
  5694.  
  5695.             About:    which searches the current  PATH  variable  for  an
  5696.                       occurrence of name.  If it finds one, the  path  to
  5697.                       name is printed.  Multiple names are  accepted,  in
  5698.                       which case the process is repeated for each one.
  5699.  
  5700.                       Although  which does  not  know  about  aliases  or
  5701.                       functions, it is often more useful  in  scripts  or
  5702.                       from the command line.  For example,  if  you  know
  5703.                       that "my_file" is in the search path, you can say:
  5704.  
  5705.                          ll $(which my_file)
  5706.  
  5707.                       to print information  on  my_file  without  knowing
  5708.                       where  it  is.   The  example  below   is   another
  5709.                       possible use.  In the function, which is used  both
  5710.                       to  avoid  interpreting  "run"  recursively  as   a
  5711.                       function, and to find the desired binary.
  5712.  
  5713.             Example:  function run {
  5714.                          cmd="$1"
  5715.                          shift
  5716.                          $(which run) $(which $cmd) $*
  5717.                       }
  5718.  
  5719.             See Also: whence
  5720.  
  5721.           _________________________________________________________________
  5722.  
  5723.  
  5724.  
  5725.  
  5726.  
  5727.  
  5728.  
  5729.  
  5730.  
  5731.  
  5732.  
  5733.  
  5734.  
  5735.  
  5736.  
  5737.  
  5738.  
  5739.           ASH Amiga Shell              Page 87            Reference Manual
  5740.  
  5741.  
  5742.  
  5743.  
  5744.  
  5745.  
  5746.  
  5747.  
  5748.  
  5749.           _________________________________________________________________
  5750.  
  5751.             Name:     while/do/done
  5752.  
  5753.             Type:     Keywords
  5754.  
  5755.             Default:  n/a
  5756.  
  5757.             Usage:    while expr do stmt_list done
  5758.  
  5759.             Range:    n/a
  5760.  
  5761.             About:    The  statement   list   is   executed   while   the
  5762.                       expression is true (returns a zero exit status).
  5763.  
  5764.             Example:  a=1
  5765.                       while [ $a -le 10 ]
  5766.                       do
  5767.                          echo "a = $a"
  5768.                       done
  5769.  
  5770.             See Also: for
  5771.  
  5772.           _________________________________________________________________
  5773.  
  5774.  
  5775.  
  5776.  
  5777.  
  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.           ASH Amiga Shell              Page 88            Reference Manual
  5806.  
  5807.  
  5808.  
  5809.  
  5810.  
  5811.  
  5812.  
  5813.  
  5814.  
  5815.           _________________________________________________________________
  5816.  
  5817.             Name:     xd
  5818.  
  5819.             Type:     External Command
  5820.  
  5821.             Default:  n/a
  5822.  
  5823.             Usage:    xd [ file ... ]
  5824.  
  5825.             Range:    n/a
  5826.  
  5827.             About:    xd (hex dump) prints a  hexadecimal  dump  of  each
  5828.                       named file, or the standard input if no  files  are
  5829.                       named.  It prints the hex address  of  the  current
  5830.                       offset as 8 digits, then a hex  dump  of  16  bytes
  5831.                       separated into groups of 2  bytes,  then  an  ASCII
  5832.                       representation of the 16 bytes, or '.' if the  byte
  5833.                       is not a printable character.
  5834.  
  5835.             Example:  xd any_old_file
  5836.  
  5837.             See Also:
  5838.  
  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.           ASH Amiga Shell              Page 89            Reference Manual
  5872.  
  5873.  
  5874.  
  5875.