HP Cisco MDS 9216 Cisco Nexus 5000 Series Command Reference Release 4.0(1a)N2( - Page 34
cli var name
View all HP Cisco MDS 9216 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 34 highlights
cli var name Chapter 1 Basic System Commands Send comments to [email protected] cli var name To define a command-line interface (CLI) variable for a terminal session, use the cli var name command. To remove the CLI variable, use the no form of this command. cli var name variable-name variable-text no cli var name variable-name Syntax Description variable-name variable-text Name of the variable. The name is alphanumeric, case sensitive, and has a maximum of 31 characters. Variable text. The text is alphanumeric, can contain spaces, and has a maximum of 200 characters. Command Default None Command Modes EXEC mode Command History Release 4.0(0)N1(1a) Modification This command was introduced. Usage Guidelines You can reference a CLI variable using the following syntax: $(variable-name) Instances where you can use variables include the following: • Command scripts • Filenames You cannot reference a variable in the definition of another variable. The Cisco NX-OS software provides a predefined variable, TIMESTAMP, that you can use to insert the time of day. You cannot change or remove the TIMESTAMP CLI variable. You cannot change the definition of a CLI variable. You must remove the variable and then create it again with the new definition. Examples This example shows how to define a CLI variable: switch# cli var name testvar interface ethernet 1/3 This example shows how to reference a CLI variable: switch# show $(testvar) 1-12 Cisco Nexus 5000 Series Command Reference OL-16599-01