hp workstations zx6000, hp server rx2600 - operation and maintenance guide
System Configuration
Extensible Firmware Interface (EFI)
Chapter 3
112
Examples:
• To stall a shell script’s execution for one second, create and execute the follow shell
script:
#
# Example script for the stall command
#
echo script stall.nsh begins
stall 1000000
echo The script has ended.
echo script stall.nsh ends
Here are the results from executing stall.nsh with echo on:
+pause.nsh> echo script stall.nsh begins
script stall.nsh begins
+pause.nsh> stall 1000000
Stall for 1000000 uS
+pause.nsh> echo script stall.nsh ends
script stall.nsh ends
if...then/endif Control Structure The if...then/endif control construct allows you
to conditionally execute one or more commands. The else portion of this control
construct provides a command or a set of commands to execute if the tested condition is
not true.
Syntax
if [not] exist file then
command [arguments]
[else
command [arguments]]
endif
if [not] str1 == str2 then
command [arguments]
[command [arguments]]
[else
command [arguments]
[command [arguments]]
...]
endif
not This keyword makes a condition that was false true and that was
true false.
exist file Test to see if the file exists. If the file exists, then the condition
is true.
str1 == str2 Test to see if str1 is equal to str2. If the strings are equal, then
the condition is true.
command This command is one of the EFI commands that may or may not be
executed in this control construct.