Cli Var Name - Cisco AP775A - Nexus Converged Network Switch 5010 Command Reference Manual

Cisco nexus 5000 series command reference, release 4.1(3)n1(1) (ol-16599-01, august 2009)
Hide thumbs Also See for AP775A - Nexus Converged Network Switch 5010:
Table of Contents

Advertisement

cli var name

S e n d c o m m e n t s t o n x 5 0 0 0 - d o c f e e d b a c k @ c i s c o . c o m
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.
Syntax Description
variable-name
variable-text
Command Default
None
Command Modes
EXEC mode
Command History
Release
4.0(0)N1(1a)
Usage Guidelines
You can reference a CLI variable using the following syntax:
$(variable-name)
Instances where you can use variables include the following:
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)
Cisco Nexus 5000 Series Command Reference
1-12
cli var name variable-name variable-text
no cli var name variable-name
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.
Modification
This command was introduced.
Command scripts
Filenames
Chapter 1
Basic System Commands
OL-16599-01

Advertisement

Table of Contents
loading

Table of Contents