Operations and Maintenance Guide, Second Edition - HP Integrity rx2600 Server and HP zx6000 Workstation

28 HP Integrity rx2600 server and HP workstation zx6000 Operation and Maintenance Guide
System Configuration
for/endfor Run commands for each item in a set of items
goto Make batch file execution jump to another location
if/endif Run commands in specified conditions
pause Print a message and suspends for keyboard input
stall Stalls the processor for the specified time in microseconds
EFI Scripts
The EFI scripting language enables you to create executable shell scripts. You can place a set of
EFI commands in the shell script and run the script as often as needed. You can also modify the
script to make it perform different tasks. Script files can be either unicode or ASCII format.
NOTE: Commands run from a batch script are not saved by the shell for DOSkey history
(up-arrow command recall).
The optional script startup.nsh is automatically run 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, follow these steps:
1. At the EFI shell prompt, run the shell’s editor. Run the following:
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. Enter or edit the commands to be run when the script is run. For example:
echo This is a test file.
3. When you are finished writing the script: press F2 to save the file and press F3 to exit.
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 Function key Escape sequence
Open file F1 Esc 0
Save file F2 Esc S
Exit F3 Esc Q
Cut F4 Esc D
Paste F5 Esc P
Goto F6 Esc G
Search F7 Esc F
Replace F8 Esc R
File type F9 Esc T