12-4 C122-E003-02EN
EFI
CHAPTER 12 EFI Shell and EFI Commands
12.4 Batch Script
The EFI shell can execute commands from batch script files as follows:
- The batch script files use the ".nsh" extension.
- The batch script files are created as Unicode files or ASCII files.
- The batch scripts support the positional argument, which can be used to
reference each argument by a number, as in %n (n=0 to 9).
%0 indicates the script file currently being executed.
- The display during execution of a command from a batch script is echoed on the
console.
- The echo –off command is used to disable display of a command read from a
batch file.
- The shell does not save information on execution of a command from a batch
script.
- The history save function used with cursor keys is not supported.
- If a command error occurs in a batch script, processing is continued by default.
- A batch script can test the results from the last command executed by using the
if command with the lasterror shell variable specified.
- A line in a batch script can be commented out by inserting the "#" character.