Setting The Switch's Terminal Width; Displaying Terminal Settings; Using Cli Variables; User-Defined Cli Session Variables - Cisco MDS 9124 - Fabric Switch Reference

Cisco mds 9000 family command reference - cisco mds san-os release 3.0(1) through 3.3(1a) (ol-16217-01, april 2008)
Hide thumbs Also See for Cisco MDS 9124 - Fabric Switch:
Table of Contents

Advertisement

Chapter 1
CLI Overview
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

Setting the Switch's Terminal Width

To set the terminal screen width for the current session, use the terminal width command in EXEC
mode. This command is specific to only the console port. Telnet and SSH sessions set the width
automatically.
The syntax for this command is terminal width columns
switch# terminal width 86
Sets the screen length for the current session to 86 columns for the current terminal session. The default
is 80 columns.

Displaying Terminal Settings

The show terminal command displays the terminal settings for the current session:
switch# show terminal
TTY: Type: "vt100"
Length: 24 lines, Width: 80 columns
Session Timeout: 525600 minutes

Using CLI Variables

The SAN-OS CLI parser supports definition and use of variables in CLI commands. CLI variables can
be used as follows:
CLI variables have the following characteristics:

User-Defined CLI Session Variables

You can define CLI variables the persist only for the duration of your CLI session using the cli var name
command in EXEC mode. These CLI variables are useful for scripts that you execute periodically.
The following example shows how to create a user-defined CLI session variable.
switch# cli var name testinterface fc 1/1
You can reference a variable using the syntax $(variable).
The following example shows how to reference a user-defined CLI session variable.
switch# show interface $(testinterface)
fc1/1 is up
OL-16217-01, Cisco MDS SAN-OS Release 3.x
Entered directly on the command line.
Passed to the child script initiated using the run-script command. The variables defined in the
parent shell are available for use in the child run-script command process.
Passed as command line arguments to the run-script command.
You cannot reference a variables through another variable using nested references.
You can define persistent variables that are available across switch reloads.
You can reference only one predefined system variable, the TIMESTAMP variable.
Hardware is Fibre Channel, SFP is short wave laser w/o OFC (SN)
Cisco MDS 9000 Family Command Reference
Using CLI Variables
1-27

Advertisement

Table of Contents
loading

Table of Contents