home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
beehive
/
program
/
cshell.arc
/
SH.DOC
< prev
next >
Wrap
Text File
|
1990-11-03
|
3KB
|
91 lines
SH(I) Little Shell SH(I)
NAME
sh - command interpreter
SYNOPSIS
sh
DESCRIPTION
The Little Shell is designed to cover the uglier part
of CP/M with a somewhat more pleasant interface. This is
accomplished at a cost. The shell is written in BDS C and
is five times the size of the CP/M CCP. Hence it takes
somewhat longer to load into memory at warm boots. Also,
since the shell clobbers the CCP submit does not work when
the shell is invoked. Nevertheless, the shell provides
features not otherwise available to CP/M users.
CP/M offers no mechanism for chaining except for the
klugy and inconvenient submit mechanism. The shell offers
two more desirable techniques. Multiple commands may
be typed on a single command line as follows:
$ command [args...] ; command [args...] ; ...
The commands are executed in sequential order from left
to right as on Unix. The amount of stuff on the command
line is limited to the command buffer size which is
defined in the CBIOS and in the shell source.
Alternatively, files of commands called Shell Scripts
may be used. These files contain multiple command lines
to be executed. The present version of the Shell limits
the length of command files to the size of the command
line buffer. A sample shell script follows:
c1 $1.c
l2 $1
if -r $1.crl rm $1.crl
if $2 == -o ren $1.com a.out
exit
Command line argument substitions occur exactly as on
the V6 Unix shell.
The CP/M operating environment does not lend itself
to the use of frequently invoked commands in the form
of executable files. Consequently, the shell has an
assortment of built-in commands. The current list is
as follows:
cat file file... - print named files on console
ccp - invoke the CP/M command processor
cd disk - select named CP/M disk
clr - clear the screen
echo [args...] - echo command line arguments
exit - exit from the shell (warm boot)
lock file file... - set named files to readonly
logout - (also ^D) invoke a login program
ls disk - list dir (default is current disk)
pwd - print current CP/M disk
ren file1 file2 - rename file1 to file2
rm file file... - remove named files
sleep n - suspend execution for n seconds
unlock file file... - set named files to readwrite
# - comment (ignore command line)
^\ - quit, like exit for now
SEE ALSO
The Unix Programmers Manual Sixth Edition,
Software Tools Programmers Manual,
BD Software C Compiler Manual v1.4
BUGS
Shell Scripts must be limited to size of the Command
line buffer. Programs cannot return a status. There are
not yet any Shell Variables.
AUTHOR
Steve Blasingame