User-Defined Cli Persistent Variables - HP Cisco MDS 9020 - Fabric Switch Configuration Manual

Cisco mds 9000 family cli configuration guide, release 3.x (ol-16184-01, april 2008)
Hide thumbs Also See for Cisco MDS 9020 - Fabric Switch:
Table of Contents

Advertisement

Using CLI Variables
S e n d d o c u m e n t a t i o n c o m m e n t s t o m d s f e e d b a c k - d o c @ c i s c o . c o m
Use the show cli variables command to display user-defined CLI session variables.
The following example displays user-defined CLI session variables.
switch# show cli variables
VSH Variable List
-----------------
TIMESTAMP="2005-10-24-21.29.33"
testinterface="fc 1/1"
Use the cli no var name command to remove user-defined CLI session variables.
The following example removes a user-defined CLI session variable.
switch# cli no var name testinterface

User-Defined CLI Persistent Variables

You can define CLI variables that persist across CLI sessions and switch reloads using the cli var name
command in configuration mode. These CLI persistent variables are configured in configuration mode
and are saved in the running configuration file.
The following example shows how to create a user-defined CLI persistent variable.
switch# config t
switch(config)# cli var name mgmtport mgmt 0
switch(config)# exit
switch#
You can reference a variable using the syntax $(variable).
The following example shows how to reference a user-defined CLI persistent variable.
switch# show interface $(mgmtport)
mgmt0 is up
Use the show cli variables command to display user-defined CLI persistent variables.
The following example displays user-defined CLI persistent variables.
switch# show cli variables
VSH Variable List
-----------------
TIMESTAMP="2005-10-24-21.37.13"
mgmtport="mgmt 0"
Use the no cli var name command in configuration mode to remove user-defined CLI persistent
variables.
The following example removes a user-defined CLI persistent variable.
switch# config t
switch(config)# no cli var name mgmtport
Cisco MDS 9000 Family CLI Configuration Guide
2-22
Hardware is FastEthernet
Address is 000e.38c6.2c6c
Internet address is 10.10.10.1/24
MTU 1500 bytes, BW 100 Mbps full Duplex
288996 packets input, 97746406 bytes
0 multicast frames, 0 compressed
0 input errors, 0 frame, 0 overrun 0 fifo
9089 packets output, 1234786 bytes, 0 underruns
0 output errors, 0 collisions, 0 fifo
0 carrier errors
Chapter 2
Before You Begin
OL-16184-01, Cisco MDS SAN-OS Release 3.x

Advertisement

Table of Contents
loading

Table of Contents