Syntax diagram conventions
A syntax diagram uses symbols to represent the elements of a command and to specify the rules for using these elements.
Within a syntax diagram, a keyword represents the name of a command, flag, parameter, or argument. Required keywords indicate the parameters or arguments that must be specified for the command.
To read syntax diagrams, follow the path of the line:
- Required keywords are displayed on the main path line. Mutually exclusive required keywords are stacked vertically. Optional key words indicate the parameters or arguments that you can choose to specify for the command. Optional keywords are shown under the main path line. Mutually exclusive optional keywords are stacked vertically.
- The main path line begins with double arrowheads (>>) and ends with two arrowheads that point to each other (><). If a diagram is longer than one line, each line to be continued ends with a single arrowhead (>) and the next line begins with a single arrowhead. The -->< symbol indicates the end of the syntax diagram.
- A dash (-) indicates that you must supply parameters from the stdin file rather than entering parameters.
- An arrow that returns to the start of an item means you can repeat the item. A character or space within the arrow means you must separate repeated items with that character or space.
- A stack of items followed by an arrow that returns to the start of the stack indicates that you can select more than one item. In some cases, you can repeat a single item.
- When a group of parameters is lengthy or a section is used multiple times in a command, it is shown as a separate fragment that follows the main diagram.
Syntax diagrams use position to indicate required, optional,
and default values for keywords, variables, and operands:
- If an element is shown on the line, the element is required. If an element is shown under the line, the element is optional. If an element is shown over the line, the element is the default.
- If an operand has a default value, the operand is shown both over and under the main line. A value under the main line indicates that the operand must be specified. You must specify the default value or one of the other valid values that are shown. If an operand is not specified, the default value over the main line is used.
- When one or more items are shown under the main line, all of the items are optional.
Command emphasis
The following typefaces
are used to show command emphasis:
- boldface
- Text in boldface represents command names.
- italics
- Text in italics is used for variables for which you supply actual values, such as a default directory or the name of a cluster.
- monospace
- Text in monospace identifies the data or commands that you type, samples of command output, examples of program code or messages from the system, or names of command flags, parameters, arguments, and name-value pairs.
Special characters
The following special
characters are used in the command descriptions:
- minus sign (-)
- Flags are prefixed with a
minus sign
(-). Flags define the action of a command or modify the operation of a command. You can use multiple flags, followed by parameters, when you issue a command. This character cannot be used as the first character of an object name. - vertical bar ( | )
- A vertical bar signifies that you choose only one value.
For example,
[ a | b ]
indicates that you can choose a, b, or nothing. Similarly,{ a | b }
indicates that you must choose either a or b. - quotation marks (" ")
- Quotation marks around a string indicate that the value can include spaces, for example, "my session name."
- brackets ([ ])
- Brackets indicate optional options, parameters, and arguments.
- braces ({ })
- Braces indicate a required choice between two or more options or arguments.
- ellipsis (...)
- Ellipses indicate repetition or multiple values or arguments.