home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD1.bin
/
new
/
util
/
shell
/
zshell
/
old
/
zshell13.doc
< prev
next >
Wrap
Text File
|
1994-10-12
|
32KB
|
1,009 lines
ZSHELL V1.30 (C) 1990,91 PAUL HAYTER
======================================
OVERVIEW
========
ZShell is a small CLI shell. I needed a shell which had my
favourite features of CSH yet was a lot smaller, so it would load
faster and use much less memory.
FEATURES
========
* about 13K.
* Supports the standard housekeeping commands
dir , cd , rename , mkdir , delete , copy , path , info ,
type.
* Function key aliasing.
* Command aliasing.
* Reverse Polish Calculator.
* Script file execution.
* 1024 byte command line history.
* Command line editing.
* Can examine the KickTagPtr,CoolCapture etc.
* Has a cold reset command.
* Wild Card file descriptions.
* Special programmers status mode.
* Simple 'More' type text viewer.
* Has a resident command.
* IF ... ELSE ... ENDIF constructs.
SPECIAL CHARACTERS
==================
The following characters have special meanings to ZShell.
" " Double quotes. Used to enclose strings with spaces.
eg "hello world".
^n Hat character. Prefixes a control character letter (n).
Used in ASK, ECHO, & SET commands. eg ^L <-clear screen
%n Percent prefixes a number (0-7) to specify an optional
parameter for command aliases. Used in SET command.
Can also be used to specify prompt arguments. See PROMPT
command.
$n Dollar prefixes a number (0-7) and corresponds to an
optional parameter specified with %n (above).
*?~[] Wildcard characters. * matches 0 to n characters. ? matches
one character, ~ negates the following wild card, and [ ]
surround a class of characters to match. See WILD CARDS.
\n Backslash prefixes a special character, whose meaning you
want ignored. eg echo "hello \"fred\"" (hello "fred")
; Semi-colon seperates multiple commands on one line.
eg. cd df1:;dir
> redirect output.
< redirect input.
>> redirect append output.
ZSHELL INBUILT COMMANDS
=======================
Most commands can be aborted by depressing Control-C.
A textual error message will be displayed if an AmigaDOS error
occurs.
------------------------------------------------------------------------
ADDBUFFERS drive number_of_buffers
* ADDBUFFERS increases disk access speed on the specified drive by
adding a number of sector cache buffers. Each additional buffer
reduces memory by about 500 bytes. Generally, 25-30 buffers is
optimal.
eg. addbuffers df0: 25
addbuffers df1: 10
------------------------------------------------------------------------
ASK [question]
* ASK prompts the user with a question requiring a Yes or No
answer. If the first letter of the users response is 'Y', ASK
returns code WARN. Any other letter will result in return code OK.
The question can include ASCII characters as well as control
codes as per the ECHO command.
eg. ask "Do you want commands copied to ram? "
if warn
copy c: ram:
endif
------------------------------------------------------------------------
ASSIGN [logical name:] [directory]
* ASSIGN will assign a logical device name to a disk directory.
eg. assign z: df1:zshell_source
Now if you do a DIR Z: you will get a directory of df1:zshell_source.
Similarly, the default device names can be reassigned.
eg. assign libs: df1:libs
* Typing ASSIGN with no parameters, will list the current device
assignments.
eg. assign
* NOTE: the logical name you give to the command MUST end in a
colon (:)
Assign is compatible with the amigados assign command.
------------------------------------------------------------------------
CD [destination]
* Changes the current directory to 'destination'. If no parameter
is given, the current directory's name is shown.
eg. cd ram:
------------------------------------------------------------------------
COPY [-r] source1 [sourcefile2] [sourcefile3]... destination
* There are 6 derivatives of the copy command.
1. copy file to file.
eg. COPY C:LIST RAM:LS
2. copy file to a directory.
eg. COPY C:MOUNT DF1:C
3. copy multiple files to a directory.
eg. COPY L:PORT-HANDLER L:DISK-VALIDATOR DF1:L
5. copy files in a directory to another directory.
eg. COPY C: DF2:C
4. copy multiple directories to a single directory.
eg. COPY L: DEVS: C: RAM:
6. Recursively copy all files and subdirectories within the source
directory to the destination directory.
eg. COPY -R DF0: DF1:
Other examples:
eg. copy fred wilma
eg. copy c:dir df1:c
eg. copy dir list type cd df1:c
eg. copy df0:devs df1:devs
eg. copy *.s ram:
copy df0: df1: {only copy the files in df0: to df1:}
------------------------------------------------------------------------
DELETE [-r] source1 [source2] [source3] [source4]... [source11]
* Deletes up to 11 files or directorys ('source1'...'source11').
* If you specify the -r option when deleting a directory, then all
subdirectories are recursively deleted also. Otherwise (if the -r
option is not given) only the files in the specified directory are
deleted.
eg. delete fred wilma barney betty dino
delete df0:devs df1:c df1:data ram:
delete menu
delete -r devs:
delete -r df1:
------------------------------------------------------------------------
DIR [source]
* Lists the directory of the 'source' to the screen. Hitting space
will pause the listing and backspace will continue it. Files are
shown with their size in bytes. DIR lists the current directory
if no parameter is given. If 'source' is a filename, then only
that file is listed.
eg. dir df0:
------------------------------------------------------------------------
DIW [source]
* This is identical to the above DIR command ,except that the
directory is printed in two vertical columns. DIW is a pseudonym
for Directory Wide.
eg. diw devs:
------------------------------------------------------------------------
ECHO [string]
* Prints the 'string' to the screen. If you want spaces in the
string, make sure the whole string is enclosed in quotes. If you
want to print special control characters (eg. ctrl-L clear screen)
then prefix the control letter with a ^ character. If you want to
print double quotes, then use the \ character before the qoutes.
eg. echo hello
echo "hello world"
echo "^Lthe screen was just cleared"
echo "^Lline 1^Jline 2^Jline 3"
echo "these are double quotes ->\""
* Some common control codes are:
^J linefeed.
^L clear screen.
^M carriage return.
^X clear line.
^[ escape.
------------------------------------------------------------------------
ELSE
* ELSE marks the middle of an IF statement. All statements
following it, and before the ENDIF statement will be executed
only if the IF condition is FALSE. See IF for usage.
------------------------------------------------------------------------
ENDIF
* ENDIF marks the end of an IF statement. See IF for usage.
------------------------------------------------------------------------
EXEC source
* Executes the ZShell script file of name 'source'. All ZShell
commands, as well as commands from disk are valid within a
script file.
eg. exec install_hard_disk
------------------------------------------------------------------------
EXIT
* Exits you from the shell back to the AmigaDOS CLI prompt.
eg. exit
------------------------------------------------------------------------
FAILAT [failat level]
* FAILAT sets the error code level at which scripts (and multiple
commands on one line) will be aborted. The default level is 10.
Most commands return 10 as a serious error, while compilers
returning Warning type errors will return 5. Hence, the default
of 10 will allow Warnings to occur without the script (or line)
being aborted.
eg. failat 20 {sets failat level to 20}
* If you do not specify a failat level, the current setting is
shown.
eg. failat
------------------------------------------------------------------------
GOTO label
* GOTO searches for the label within the curren