Each of the tools in our set has a command-line interface following the
style of other common Unix tools and also allows command-line options to
be specified in a file (Section ), whose name
is given on the command line.
As for most Unix tools, almost all command options have both
long and short forms. The short forms start with a single ``-'', the
long ones with two. Some options take additional parameters. With the
short form, these parameters can be put directly after the command option
(``-nnewname'') or can be separated from it by a blank
(``-n newname'').
With the long form, there may be a ``='' (``
--name=newname
'')
or a blank (``--name newname
'') separating the parameter from the command
option. The long forms may be abbreviated (``--na=newname
'') as
long as the prefix is unique among the switches available for the tool
in question.
If some parameters contain special characters,
such as ``*'', ``('' or ``"'', this can
lead to conflicts with the shell, which tries to interpret these characters
in its own way. The interpretation of a character can be prevented in
most shells, by either putting a ``\
'' before the character
or by quoting the word (or parts containing the special characters)
with ``'''. For example:
sus2sus '--filter=int(points)>100' --add quad=simp\*simpNotice that when an option is enclosed in quotes, the ``='' separator between the option name and the value is necessary.
Another way of getting around the problem of these special characters is
the use of command input files (Section
). Every character is such a file is treated
literally, which means that special characters need not (indeed must not)
be quoted. You can
insert the parameters of a command inpu file at any point in
the command line using ``
@ <filename>
'' or ``@<filename>
''.
All styles of input on the command line can be mixed:
labrun --cvs=~/dir --name test -ccomment1 -c comment2 @optfile
All lab-programs start other programs. This gives rise to
the additional problem that when passing the commands via a shell
command, the special characters have to be quoted again. For this
reason the characters ``[]<>()$ *?\"'\|;&
'' are quoted by a backslash once read in by the tools. If you want the
characters to be interpreted by a shell, you have to include a
``sh -c'' command explicitly. (See page for an
example.)