home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / beehive / program / cshell.arc / SH.DOC < prev    next >
Text File  |  1990-11-03  |  3KB  |  91 lines

  1. SH(I)            Little Shell            SH(I)
  2.  
  3. NAME
  4. sh - command interpreter
  5.  
  6. SYNOPSIS
  7. sh
  8.  
  9. DESCRIPTION
  10.  
  11.    The Little Shell is designed to cover the uglier part
  12. of CP/M with a somewhat more pleasant interface. This is
  13. accomplished at a cost. The shell is written in BDS C and
  14. is five times the size of the CP/M CCP. Hence it takes
  15. somewhat longer to load into memory at warm boots. Also,
  16. since the shell clobbers the CCP submit does not work when
  17. the shell is invoked.  Nevertheless, the shell provides
  18. features not otherwise available to CP/M users.
  19.  
  20.    CP/M offers no mechanism for chaining except for the
  21. klugy and inconvenient submit mechanism.  The shell offers
  22. two more desirable techniques.  Multiple commands may
  23. be typed on a single command line as follows:
  24.  
  25.     $ command [args...] ; command [args...] ; ...
  26.  
  27. The commands are executed in sequential order from left
  28. to right as on Unix. The amount of stuff on the command
  29. line is limited to the command buffer size which is 
  30. defined in the CBIOS and in the shell source.
  31.  
  32.    Alternatively, files of commands called Shell Scripts
  33. may be used. These files contain multiple command lines
  34. to be executed. The present version of the Shell limits
  35. the length of command files to the size of the command
  36. line buffer.  A sample shell script follows:
  37.     c1 $1.c
  38.     l2 $1
  39.     if -r $1.crl rm $1.crl
  40.     if $2 == -o ren $1.com a.out
  41.     exit
  42.  
  43. Command line argument substitions occur exactly as on 
  44. the V6 Unix shell.
  45.  
  46.    The CP/M operating environment does not lend itself  
  47. to the use of frequently invoked commands in the form 
  48. of executable files. Consequently, the shell has an
  49. assortment of built-in commands. The current list is
  50. as follows:
  51.  
  52.  
  53.    cat file file...    - print named files on console
  54.    ccp             - invoke the CP/M command processor
  55.    cd disk        - select named CP/M disk
  56.    clr            - clear the screen
  57.    echo [args...]    - echo command line arguments
  58.    exit            - exit from the shell (warm boot)
  59.    lock file file...    - set named files to readonly
  60.    logout        - (also ^D) invoke a login program
  61.    ls disk        - list dir (default is current disk)
  62.    pwd            - print current CP/M disk
  63.    ren file1 file2    - rename file1 to file2
  64.    rm file file...    - remove named files
  65.    sleep n        - suspend execution for n seconds
  66.    unlock file file...    - set named files to readwrite
  67.    #            - comment (ignore command line)
  68.    ^\            - quit, like exit for now
  69.  
  70.  
  71.  
  72. SEE ALSO
  73.  
  74.    The Unix Programmers Manual Sixth Edition,
  75.    Software Tools Programmers Manual,
  76.    BD Software C Compiler Manual v1.4
  77.  
  78. BUGS
  79.  
  80.    Shell Scripts must be limited to size of the Command
  81.    line buffer. Programs cannot return a status. There are
  82.    not yet any Shell Variables.
  83.  
  84.  
  85.  
  86. AUTHOR
  87.  
  88.    Steve Blasingame
  89.  
  90.  
  91.