Directing Show Command Output To A File; Using Cli Variables - Cisco AP776A - Nexus Converged Network Switch 5020 Configuration Manual

Cisco mds 9000 family cli configuration guide - release 4.x (ol-18084-01, february 2009)
Hide thumbs Also See for AP776A - Nexus Converged Network Switch 5020:
Table of Contents

Advertisement

Chapter 2
Before You Begin
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
The following example displays the configured banner message.
switch# show banner motd
Testing the MOTD Feature
The configured MOTD banner is displayed before the login prompt on the terminal whenever a user logs
in to a Cisco MDS 9000 Family switch.
Testing the MOTD Feature
switch login:
Follow these guidelines when choosing your delimiting character:
You can include tokens in the form $ (token) in the message text. Tokens will be replaced with the
corresponding configuration variable. For example:
The following example spans multiple lines and uses tokens to configure the banner message:
switch# config t
switch(config)# banner motd #
Enter TEXT message. End with the character '#'.
Welcome to switch $(hostname).
Your tty line is $(line).
#

Directing show Command Output to a File

You can direct show command output to a file, either on the volatile file system, on slot0 CompactFlash
memory, or on a remote server.
The following example shows how to direct the show running-config output to a file on the volatile file
system.
switch1# show running-config > volatile:switch1-run.cfg
The following example shows how to direct the show running-config output to a file on slot0
CompactFlash memory.
switch2# show running-config > slot0:switch2-run.cfg
The following example shows how to direct the show running-config output to a file on a TFTP server.
switch3# show running-config > tftp://10.10.1.1/home/configs/switch3-run.cfg
Preparing to copy...done

Using CLI Variables

The NX-OS CLI parser supports the definition and use of variables in CLI commands. CLI variables can
be used as follows:
OL-18084-01, Cisco MDS NX-OS Release 4.x
Do not use the delimiting-character in the message string.
Do not use " and % as delimiters.
displays the host name for the switch
$(hostname)
displays the vty or tty line or name
$(line)
Entered directly on the command line.
Directing show Command Output to a File
Cisco MDS 9000 Family CLI Configuration Guide
2-21

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents