Configuring Cli Session-Only Variables; Configuring Persistent Cli Variables - Cisco Nexus 5500 Series Configuration Manual

Nx-os fundamentals configuration guide, release 7.x
Hide thumbs Also See for Nexus 5500 Series:
Table of Contents

Advertisement

Understanding the Command-Line Interface
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
Command or Action
Step 1
cli var name variable-name variable-text
Example:
switch# cli var name testinterface
ethernet 2/1
Step 2
show cli variables
Example:
switch# show cli variables

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
OL-30890-01
Purpose
Configures the CLI session variable. The variable-name argument is
alphanumeric, case sensitive, and has a maximum length of 31
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.
Cisco Nexus 5500 Series NX-OS Fundamentals Configuration Guide, Release 7.x
Configuring CLI Session-Only Variables
55

Advertisement

Table of Contents
loading

Table of Contents