User`s guide

5-10
User's Guide
Variable Substitution
Environment variables can be set and viewed through the use of the set command (see set
command in this chapter). To access the value of an environment variable as an argument to
a Shell command, delimit the name of the variable with the % character before and after the
variable name; for example, %myvariable%.
The Shell maintains a special variable, named lasterror. The variable contains the return
code of the most recently executed Shell command.
Wildcard Expansion
The *, ? and [ characters can be used as wildcard characters in filename arguments to
Shell commands.
If an argument contains one or more of these characters, the Shell processes the argument for
file meta-arguments and expands the argument list to include all filenames matching the
pattern.
These characters are part of patterns which represent file and directory names.
Character Sequence
Meaning
"*" Matches zero or more characters in a file name
"?" Matches exactly one character of a file name
"[chars]" Defines a set of characters; the pattern matches any single character in
the set. Characters in the set are not separated. Ranges of characters
can be specified by specifying the first character in a range, then the
character, then the last character in the range. Example: [a-zA-Z]
Table 31. Wildcard character expansion
Output Redirection
Output of EFI Shell commands can be redirected to files, according to the following syntax:
Command
Output Redirection
> unicode_output_file_pathname standard output to a unicode file
>a ascii_output_file_pathname standard output to an ascii file
1> unicode_output_file_pathname standard output to a unicode file
1>a ascii_output_file_pathname standard output to an ascii file
2> unicode_output_file_pathname standard error to a unicode file
2>a ascii_output_file_pathname standard error to an ascii file
>> unicode_output_file_pathname standard output appended to a unicode file
>>a ascii_output_file_pathname standard output appended to an ascii file
1>> unicode_output_file_pathname standard output appended to a unicode file
1>>a ascii_output_file_pathname standard output appended to an ascii file
Table 32. Output redirection syntax
The Shell will redirect standard output to a single file and standard error to a single file.
Redirecting both standard output and standard error to the same file is allowed. Redirecting
Standard output to more than one file on the same command is not supported. Similarly,
redirecting to multiple files is not supported for standard error.