.so macs.txt

.sp 10
.(l C
UNIX-LIKE TOOLS
AVAILABLE FROM VMS
.sp 2
\*(td
.)l
.fi
.bp
.sh  1 "CD"
.pp
The Unix change directory command's most attractive feature is that
it checks target directorys.  This CD command will not only check
target directories but also allow some limited specification of
paths in Unix format as well as VMS format.  In vms format the
brackets around the directory specification can by omitted.  It
will even change to a VMS logical.
.sh 2 "PUSHD/POPD"
.pp
PUSHD just as in Unix is an extension to CD which saves the current
directory on a directory stack.  POPD is the symmetrical tool
which provides the facility to return to the \&'pushed' directory.
.sh 3 "CDPATH's"
.pp
A CDPATH is a path of directories under UNIX which the user can
specify.  The CD command will search these directories for your
target directory.  A facility which approximates these capabilities
has been provided under VMS which actually gives some additional
capabilities.  Define a symbol called \&'CDPATH' in the DCL
shell which is a list of blank separated VMS directories.
Invoking the CDHASH program will search these directories and
define a logical for each subdirectory the value of which is
the full path location.  CD'ing to a directory from anywhere
in the system thus becomes a matter of typing the subdirectory name.
The additional capabilities this provides are that this symbol is
a true logical and thus can also be supplied to a directory command
or used as a preface to a file name.
.sh 4 "E(X)TEND"
.pp
Extend provides a capability for a user to run from the standard DCL
shell and yet extend to some Unix-like advanced capabilities when
necessary.  Extend provides the capability for easy i/o redirection,
pipes, backgrounding, and multiple command entry from one command line.
Extend is invoked by simply typing \&'x' followed by a list of dcl
commands mixed with extended command characters.
.ip "input redirection"
Input can be obtained from files on the system through the use of
the \&'< file' command.  This command works by both assigning sys$input and
pas$input and specifing the file name as the last parameter to the command.
A unix mode \&'-u' for extend will eliminate the file specification.  This works
in most cases but not always.
.ip "output redirection"
Output can be diverted to a file on the system through the use of the
\&'> file' command.  This command will divert sys$output and pas$output
to the file.
.ip "pipes"
Two commands can have their outputs and inputs connected through the
pipe construct \&'|'.  The effect is to do an output redirection on
the source process and a input redirection on the target process
so again, the input redirection is not guaranteed to work.  Pipes differ
in that they use mailboxes for the connection, not files.
.ip "standard error"
Many times you want to divert both sys$output and sys$error.  In Unix,
stderr holds only error messages and stdout has the rest.  In VMS,
sys$output is basically a superset of sys$error.  Therefore, while
\&'>&' and \&'|&' to divert both sys$output and sys$error are supported,
the effect is to divert sys$output and send sys$error to the null
device.
.ip "multiple commands"
Multiple commands on a line may be simply specified by separating them
by semicolons ';'.
.ip "backgrounding"
You can background a command by simply following the command specification
by a \&'&'.  To check the status of the command there is a separate command
\&'jobs' which will show the status of background processes.
Aborting the execution of the command is possible using the
\&'kill' command.  \&'kill' takes one argument, either the
process id to kill or the job number preceeded by a \&'%'.
You can select whether you want immediate notification of process
completion or only when executing the \&'jobs', \&'kill'
or \&'x' commands,
set a logical called 'notify' in the DCL shell to any value if
you want immediate notification.
.ip "grouping"
You can group commands so that an i/o redirection will apply
to the entire sequence of commands by surrounding the commands with
parentheses and following the parentheses with the redirection
commands.
.ip "quoting"
If you want to pass one of these special characters to the DCL shell,
such as \&';' for a version number, you must 'quote' it by preceeding
it with the \&'\' character.
