User guide
• if command_sequence
then command_sequence
[ elif command_sequence then command_sequence ]
[ else command_sequence ]
fi
Conditional branching in if, while, and until loops is determined by the exit
status of the command sequence following the control structure. In general, an
exit status of zero indicates success and results in the execution of the true path.
In the following example, the eval command is used to extract an exit status
from variable junk. The variable is initialized with the console set command.
>>> set junk 0
>>> show junk
junk 0
>>> eval junk
0
>>> if (eval junk) then (echo true) else (echo false) fi
0
true
>>> set junk 1
>>> if (eval junk) then (echo true) else (echo false) fi
1
false
>>> set junk 2
>>> if (eval junk)
_> then (echo true)
_> else (echo false) fi
2
false
>>>
12.2 Getting Information About the System
The following commands are used to display information about software and
hardware resident in the system:
Command Description Example
show version Displays
version
number
of console
firmware
V1.1-0 Jul 1 1996 10:16:59
Console Primer 12–5