EasyManua.ls Logo

Cisco Nexus 5500 Series - Configuring CLI Session-Only Variables; Configuring Persistent CLI Variables

Cisco Nexus 5500 Series
160 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
The TIMESTAMP variable name is case sensitive. All letters must be uppercase.Note
Configuring CLI Session-Only Variables
You can define CLI session variables to persist only for the duration of your CLI session. These variables are
useful for scripts that you execute periodically. You can reference the variable by enclosing the name in
parentheses and preceding it with a dollar sign ($), for example $(variable-name).
SUMMARY STEPS
1.
cli var name variable-name variable-text
2.
(Optional) show cli variables
DETAILED STEPS
PurposeCommand or Action
Configures the CLI session variable. The variable-name argument is
alphanumeric, case sensitive, and has a maximum length of 31
cli var name variable-name variable-text
Example:
switch# cli var name testinterface
ethernet 2/1
Step 1
characters. The variable-text argument is alphanumeric, case sensitive,
can contain spaces, and has a maximum length of 200 characters.
(Optional)
Displays the CLI variable configuration.
show cli variables
Example:
switch# show cli variables
Step 2
Configuring Persistent CLI Variables
You can configure CLI variables that persist across CLI sessions and device reloads.
SUMMARY STEPS
1.
configure terminal
2.
cli var name variable-name variable-text
3.
exit
4.
(Optional) show cli variables
5.
(Optional) copy running-config startup-config
Cisco Nexus 5500 Series NX-OS Fundamentals Configuration Guide, Release 7.x
OL-30890-01 55
Understanding the Command-Line Interface
Configuring CLI Session-Only Variables

Table of Contents

Other manuals for Cisco Nexus 5500 Series

Related product manuals