The parsing of a command line into a sequence of commands is complex, and varies subtly from command interpreter to command interpreter. There are, however, four main components:

Variable substitution

A command line is scanned for variable specifications, and any found are replaced with the contents of those variables.

Quoting

`Special characters can be quoted, to remove their special meanings.

Syntax

Command lines are developed into a sequence of commands according to a syntax.

Redirection

Redirection specifications are applied, and removed from the command line, before an individual command in a sequence is executed.

Variable substitution

Command lines can contain variable specifications. These comprise a % character followed by a name, followed by a second % character unless the name is a digit in 0 ... 9 or an asterisk *.

Variable specifications are replaced with values as follows:

Special names

Some variable names are not visible using SET command. Rather, they are made available for reading using the % notation. To find out about them, type help set.

Special variable names and what they expand to:

Untitled Database

Links:

Quoting and escaping

You can prevent the special characters that control command syntax from having their special meanings as follows, except for the percent sign (%):