Command Scripts; Executing Commands Specified In A Script - 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

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
You see the last 10 lines of the mylog file.

Command Scripts

This section includes the following sections:

Executing Commands Specified in a Script

The run-script command executes the commands specified in a file. To use this command, be sure to
create the file and specify commands in the required order.
You cannot create the script files at the switch prompt. You can create the script file on an external
Note
machine and copy it the bootflash: directory. This section assumes that the script file resides in the
bootflash: directory.
The syntax for this command is run-script filename.
This example displays the CLI commands specified in the testfile that resides in the slot0 directory.
switch# show file slot0:testfile
conf t
interface fc 1/1
no shutdown
end
sh interface fc1/1
This file output is in response to the run-script command executing the contents in the testfile file:
switch# run-script slot0:testfile
'conf t'
Enter configuration commands, one per line. End with CNTL/Z.
'interface fc1/1'
'no shutdown'
'end'
'sh interface fc1/1'
fc1/1 is down (Fcot not present)
...
OL-16184-01, Cisco MDS SAN-OS Release 3.x
Executing Commands Specified in a Script, page 2-33
Using CLI Variables in Scripts, page 2-34
Setting the Delay Time, page 2-34
Hardware is Fibre Channel
Port WWN is 20:01:00:05:30:00:48:9e
Admin port mode is auto, trunk mode is on
vsan is 1
Beacon is turned off
Counter Values (current):
0 frames input, 0 bytes, 0 discards
0 runts, 0 jabber, 0 too long, 0 too short
0 input errors, 0 CRC, 0 invalid transmission words
0 address id, 0 delimiter
0 EOF abort, 0 fragmented, 0 unknown class
0 frames output, 0 bytes, 0 discards
Received 0 OLS, 0 LRR, 0 NOS, 0 loop inits
Transmitted 0 OLS, 0 LRR, 0 NOS, 0 loop inits
Counter Values (5 minute averages):
Cisco MDS 9000 Family CLI Configuration Guide
Command Scripts
2-33

Advertisement

Table of Contents
loading

Table of Contents