ENDIF

ENDIF
Note

Note

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

Description

Causes the IF construct to be terminated.

Syntax Description

This command has no arguments or variables.

Default

N/A.

Usage Guidelines

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.

Example

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

History

This command was first available in ExtremeXOS 11.6.

Platform Availability

This command is available on all platforms.