HP zx2000 Technical Reference Manual page 61

Hp zx2000: reference guide
Table of Contents

Advertisement

EFI scripts
The EFI scripting language allows you to create executable shell scripts. You can place a set of
EFI commands in the shell script, then execute the script as often as needed. You also can modify
the script to make it perform different tasks. Script files can be either unicode or ASCII format.
Note that commands executed from a batch script are not saved by the shell for DOSkey history
(up-arrow command recall).
The optional script startup.nsh is automatically executed when you enter the EFI shell
environment. All EFI shell scripts have the ".nsh" suffix.
This section provides a brief explanation of how to create, edit and run an EFI shell script.
To create or edit a shell script:
1. At the EFI shell prompt, run the shell's editor. Execute:
fs0:\> edit file.nsh
where file.nsh represents the name of the new shell script you are creating or the existing
script you want to edit.
2. Type or edit the commands to be executed when the script is run. For example:
echo This is a test file.
3. When you are finished writing the script: press
editor.
The EFI editor is controlled by function key commands. A menu of available commands is
shown at the bottom of the screen. If you are accessing the editor through a terminal emulator
and the function keys do not work, use the escape sequences listed here.
Command
Open file
Save file
Exit
Cut
Paste
Goto
Search
Replace
File type
To run a shell script:
1. Type the name of the command at the EFI shell prompt. For example:
fs0:\> mytest.nsh
2. Press
Enter
technical reference guide
Function Key
F1
F2
F3
F4
F5
F6
F7
F8
F9
.
F2
to save the file, then press
Escape Sequence
Esc 0
Esc S
Esc Q
Esc D
Esc P
Esc G
Esc F
Esc R
Esc T
System Configuration
F3
to exit the
3–9

Advertisement

Table of Contents
loading

Table of Contents