Specifications

Version 2.0
59
3.4.1 Special Characters
When the shell scans its input, it always treats certain characters (#, >, <, |, %, *, ?,
^, , space, [, ] and newline) specially. The usage of these characters is briefly
listed here:
Table 3 Special Characters in Shell
Character Description
newline Ends a command line.
space Ends an argument, if it is not in a quotation.
# Starts a comment.
> Used for output redirection.
< Used for input redirection
| Used for pipe command support.
% Used to delimit a variable or an argument.
Used to delimit a quotation.
^ Prevents the next character from being interpreted as having special meaning.
Can be used inside quoted strings.
*, ?, [, ] Wildcards to specify multiple similar file names.
3.4.2 Escape Characters
The escaping character ^ is used to prevent interpreting the character that
immediately follows it as a special character.
3.4.3 Quoting
The UEFI Shell uses quotation marks for argument grouping. Normally, the UEFI Shell
will interpret a one or more whitespace character as an argument delimiter. However,
if the whitespace character appears between double quotation marks, it will be
ignored for the purposes of argument delimiting. Empty strings are treated as valid
command line arguments. Substitution of environment variables and positional
parameters still occurs within quotation marks.
Double-quotation marks that surround arguments are stripped before they are passed
to the entry point of a shell application. For more information, see the Argv member
of the EFI_SHELL_PARAMETERS_PROTOCOL.
Double-quotation marks that surround arguments are not stripped in positional
parameters (see Positional Parameters, section 3.6.2) or on the copy of the command
line p
assed in the LoadOptions member of the EFI_LOADED_IMAGE_PROTOCOL passed
to shell applications.
To include a double-quotation mark inside of a quoted string, use ^”. To include a ^
character inside of a quoted string, use ^^.