Send documentation comments to mdsfeedback-doc@cisco.com
4-89
Cisco MDS 9000 Family Command Reference
OL-8413-07, Cisco MDS SAN-OS Release 3.x
Chapter 4 C Commands
cli var name (configuration)
cli var name (configuration)
To define a CLI variable that persists across CLI sessions and switch reloads, use the cli var name
command in configuration submode. To remove the user-defined persistent CLI variable, use the no form
of the command.
cli var name name value
no cli var name name
Syntax Description
Defaults None.
Command Modes Configuration submode.
Command History
Usage Guidelines CLI variables can be used as follows:
• Entered directly on the command line.
• Passed to the child script and initiated using the run-script command. The variables defined in the
parent shell are available for use in the child run-script command process.
• Passed as command-line arguments to the run-script command.
• Referenced using the syntax $(variable).
CLI variables have the following limitations:
• You cannot reference a variable through another variable using nested references.
Examples The following example creates a persistent user-defined CLI variable.
switch# config t
switch(config)# cli var name mgmtport mgmt 0
Related Commands
name Specifies a variable name. The maximum size is 31 characters.
value Specifies a variable value. The maximum size is 80.
Release Modification
3.0(1) This command was introduced.
Command Description
show cli variables Displays all CLI variables (persistent, session and system).