OpenTP1 Version 7 Operation

[Contents][Index][Back][Next]

12.1.2 Operation command specification format

Following is the specification format for an operation command:

command-name options command-arguments
 
Organization of this subsection
(1) Command name
(2) Options
(3) Command arguments

(1) Command name

The command name is the file name of the command that is to be executed.

The OpenTP1 operation commands are located under $DCDIR/bin/; therefore, DCDIR/bin must be added to PATH.

(2) Options

In the explanation below, $ indicates the shell prompt, and cmd indicates a command name.

  1. An option is a character string beginning with a minus sign (-) that has either no or one flag argument.
    Following is the option specification format:
    -option-flag
    or
    -option-flag flag-argument
    Explanation:
    option-flag
    One alphanumeric character (uppercase characters are distinguished from lowercase characters)
    flag-argument
    Argument for the option flag
  2. A series of option flags that do not have flag arguments can be specified consecutively following a single minus sign.
    Example:
    The following two specifications have the same meaning:
    $ cmd -a -b -c
    $ cmd -abc
  3. If an option flag requires a flag argument, the flag argument cannot be omitted.
  4. When a command is input from the shell and its flag argument contains a whitespace character, the entire flag argument must be enclosed in double quotation marks (").
    Example:
    Option f with the argument 1 2 must be specified as follows:
    $ cmd -f "1 2"
  5. If the same option flag is specified more than once, the last specification is effective.
    Example:
    $ cmd   -a 1 / Ineffective     -a 2 / Effective
  6. Options must be specified before command arguments.
    Example:
    If option flag a requires no flag argument and the following command is entered, file and -b are both regarded as command arguments:
    $ cmd -a file -b
  7. Two consecutive minus signs (--) indicate the end of the options.
    Example:
    If the following command is entered, -b is regarded as a command argument:
    $ cmd -a -- -b
  8. An option consisting of a minus sign only cannot be entered.
    Example:
    If the following command is entered, the minus sign is regarded as a command argument:
    $ cmd -

(3) Command arguments

A command argument is used to specify an object of the command's processing.

Usually, up to 1,024 command arguments can be specified. However, the upper limit of command arguments is sometimes less than 1,024 depending on the command.

The following lists specification examples of command arguments. In the explanation below, $ indicates the shell prompt, cmd indicates a command name, -a indicates the option flag which requires flag arguments, -b indicates the option flag which requires no flag argument, and param1, param2, ... paramN indicates command arguments.

  1. If no command argument is specified, the number of command arguments is 0.
    Example:
    $ cmd
    $ cmd -b
    $ cmd -a 1
  2. Only param1 is a command argument and therefore the number of command arguments is 1.
    Example:
    $ cmd param1
    $ cmd -b param1
    $ cmd -a 1 -b param1
  3. The elements following param1 are command arguments and therefore the number of command arguments is N (N is up to 1,024).
    Example:
    $ cmd param1 param2 ... paramN
    $ cmd -b param1 param2 ... paramN
    $ cmd -a 1 -b param1 param2 ... paramN