ELSE

ELSE
Note

Note

This is a script statement and operates only in scripts when scripting is enabled with the following command: enable cli scripting {permanent} .

Description

Command block to be executed if the condition specified in the associated IF statement is not met.

Syntax Description

statements Actions to be executed when the conditions specified in the associated IF statement are not met.

Default

N/A.

Usage Guidelines

CLI scripting must be enabled before using this command.

This command must be preceded by IF _expression THEN statements and followed by ENDIF.

You can insert comments by using a number sign (#).

Example

The following example executes the show switch command if the value of the variable x is greater than 2, and execute the show vlan command otherwise:

IF ($x > 2) THEN

    show switch

ELSE

    show vlan

ENDIF

History

This command was first available in ExtremeXOS 11.6.

Platform Availability

This command is available on all Universal switches supported in this document.