History Substitution; Abbreviating A Command; Completing A Partial Command; Scrolling Through Command Output - Cisco WS-C2948G-GE-TX Configuration Manual

Catalyst 4500 series switch
Table of Contents

Advertisement

History Substitution

History Substitution
The history buffer stores the last 20 commands that you entered during a terminal session. History
substitution allows you to repeat these commands using special abbreviated commands, that are similar
to those used on the UNIX command line.
Table 2-2
Command
To repeat recent commands:
!!
!-nn
!n
!aaa
!?aaa
To modify and repeat the most recent command:
^aaa^bbb
To add a string to the end of a previous command and repeat it:
!!aaa
!n aaa
!aaa bbb
!?aaa bbb

Abbreviating a Command

When typing a command, you can abbreviate any command or keyword to the number of characters that
uniquely define the command. For example, you can abbreviate the show command to sh. After entering
the command at the system prompt, press Return to execute the command.

Completing a Partial Command

The Tab key allows you to use the command-completion feature. When you enter a unique partial
character string and press Tab, the system completes the command or keyword on the command line.
For example, if you enter co and press the Tab key, the system completes the command as configure
because it is the only command that matches the criteria.

Scrolling Through Command Output

When the output of a command fills more than one terminal screen, the output is displayed through the
More program; a ---More--- prompt is displayed at the bottom of the screen. The More program is used
for any output that has more lines than can be displayed on the terminal screen, including the show
command output. To view the next line or screen, use the following tasks.
Catalyst 4500 Series, Catalyst 2948G, Catalyst 2948G-GE-TX, and Catalyst 2980G Switches Software Configuration Guide–Release 8.2GLX
2-6
History Substitution Commands
Function
Repeats the most recent command.
Repeats the nnth most recent command.
Repeats the command n.
Repeats the command beginning with string aaa.
Repeats the command containing the string aaa.
Replaces the string aaa with the string bbb in the most recent command.
Adds the string aaa to the end of the most recent command.
Adds the string aaa to the end of command n.
Adds the string bbb to the end of the command beginning with string
aaa.
Adds the string bbb to the end of the command containing the string aaa.
Chapter 2
Table 2-2
lists the history substitution commands.
Using the Command-Line Interface
78-15908-01

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents