Note
This is a script command and operates only in scripts when scripting is enabled with the following command: enable cli scripting {permanent}.
Causes the IF construct to be terminated.
This command has no arguments or variables.
N/A.
The ENDIF command should be used after the IF _expression THEN statement(s) command.
You can insert comments by using a number sign (#). CLI scripting must be enabled to use this command.
The following example executes the show switch command if the value of the variable is greater than 2 and execute the show vlan command otherwise:
IF ($x > 2) THEN show switch ELSE show vlan ENDIF
This command was first available in ExtremeXOS 11.6.
This command is available on ExtremeSwitching X435, X440-G2, X450-G2, X460-G2, X465, X590, X620, and X695 series switches.