CL -- Using the Shell Command Line parser 83/08/01
Beginning with Software Release 4, many Shell commands have been changed to
use a common command line parsing procedure. The procedure determines how
each command processes the command line information. Commands which
implement this common command line handling are noted as such in their HELP
files by a {CL} on the usage line. The common options listed below are
NOT enumerated for each command.
COMMON OPTIONS
1) All commands that use the Command Line parser recognize the following
common command options:
-QA Query All -- cause the command to query for each name before
operating on the name.
-QW Query Wild -- cause the command to query for all names which
have been specified using wildcards before operating on those
names. This is only available for commands which accept
wildcards.
-NQ No Query -- suppress any query for names.
-AE Abort on Error -- cause the command to abort immediately
if it has trouble. These commands normally go on to the
next name.
When a query option is selected, the command writes each pathname to error
output (attached to the process transcript pad by default), followed by a
question mark. The command then reads a response from error input
(attached to the keyboard by default). This response may be:
y to operate on the name
n to ignore the name
q to quit immediately
g to suppress further queries for names
d to set the default. The default action is used when a
null line is entered in response to a query. Follow the
"d" with "yes," "no," or "none."
The initial default is "none."
2) Commands which are destructive, such as DLF (DELETE_FILE), DLT
(DELETE_TREE), and CPF (COPY_FILE) (when the -Replace keyword is used)
will query for all names which have been specified using wildcards.
This query can be suppressed by using -NQ, or extended to all names by
using -QA.
COMMON FEATURES
In addition to the common command options listed above, each command that
uses the Command Line parser provides the following features:
1) You may use wildcards to specify existing pathnames. For example,
$ prf ?*.lst
and
$ dlf /fred/.../?*.bak /jon/?*.bak
For information about wildcards, type HELP WILDCARDS.
2) When a command requires pairs of names which are in some way related,
'derived names' may be used. (Such commands include CHN (CHANGE_NAME)
and CPF (COPY_FILE).) HELP WILDCARDS also describes derived names.
For example,
$ cpf ?*.pas /source/=
and
$ chn {%.pas}.03.?? @1.backup
3) You may also use a derived name repeatedly with multiple source names.
This is specified by enclosing source names in parentheses. For example,
$ chn (a b c) =.old
renames "a" to "a.old", "b" to "b.old", etc.
4) When meaningful, multiple names are accepted from the command line.
Thus, such commands as CRL (CREATE_LINK), PRF (PRINT_FILE), and CRD
(CREATE_DIRECTORY) can operate on several files at once. For example,
$ crd dir1 dir2 dir3
and
$ crl /latest //us/latest /us //us/us /streams //sloth/streams
and
$ prf prog.ins.pas prog.lst oldprog.lst
5) When a "*" appears on the command line, standard input is read for
further names and arguments. For example,
$ dlf * -qa
file_a
file_b
?*.bak
*** EOF ***
$
If multiple names appear per line, the second and subsequent names are
considered to be derived names. Thus, the following commands are
equivalent:
(a) $ chn a a.old b b.old (b) $ chn * (c) $ chn * =.old
a a.old a
b b.old b
*** EOF *** *** EOF ***
6) The "*" operator may also be used to cause names to be read from a
file, in lieu of standard input. To do this, follow the "*" with the
name of the file, with no intervening space. For example,
$ dlf *//gerry/delete_these
and
$ cpf *run_file_list /latest/com/=