Specifications
Version 2.0
65
uefiversion V/RO Reflects the revision of the UEFI specification that the
underlying firmware supports. The contents will look like
this:
2.10
3.6.2 Positional Parameters
Positional parameters are the first ten arguments (%0-%9) passed from the command
line into a UEFI shell script. The first parameter after the UEFI Shell script name
becomes %1, the second %2, the third %3 , and so on. %0 is the full path name of the
script itself.
The shift (see page 162) command can be used delete the contents of %1 and shift
all of the other positional parameters down one place (%2 -> %1, %3 -> %2, %4 ->
%3, etc.) There is no way for a UEFI Shell script to access the 10
th
or greater
argument without using shift.
When executing the UEFI Shell script, the %n is replaced by the corresponding
argument on the command-line that invoked the script. If a positional parameter is
referenced in the UEFI Shell script but that parameter was not present, then an empty
string is substituted.
Positional parameters do not have quotation marks removed from them. For more
information on how quotation marks are handled, see “Quoting”
3.6.3 Index Parameters
Index parameters are the variables created by the for command (see page 139)
when executing inside of a UEFI Shell script. Each index parameter is in the form of
%x, where x is a case-insensitive letter (%a-%z).
When executing the UEFI Shell script, the %x is replaced by the value specified by the
for command. If the specified index parameter has not been defined in the current
UEFI Shell script, the script execution will halt with an error.
3.6.4 Aliases
An alias creates an additional name for an internal UEFI Shell command or a UEFI
Shell application. Aliases can be used to provide alternative commonly used names for
existing shell commands or even create shortcuts. An alias is a C-style identifier and
may refer to an internal command or else the directory and file name of a UEFI shell
application.
During command-line processing, if the 1
st
argument of a command is a defined alias,
the shell replaces the alias with its defined value. The alias substitution occurs after










