6-10
Cisco Aironet 1300 Series Outdoor Access Point/Bridge Hardware Installation Guide
OL-5048-02
Chapter 6 Using the Command-Line Interface
Searching and Filtering Output of show and more Commands
In this example, the
access-list
global configuration command entry extends beyond one line. When the
cursor reaches the end of the line, the line is shifted ten spaces to the left and redisplayed. The dollar
sign ($) shows that the line has been scrolled to the left. Each time the cursor reaches the end of the line,
the line is again shifted ten spaces to the left.
br(config)#
access-list 101 permit tcp 131.108.2.5 255.255.255.0 131.108.1
br(config)# $
101 permit tcp 131.108.2.5 255.255.255.0 131.108.1.20 255.25
br(config)# $
t tcp 131.108.2.5 255.255.255.0 131.108.1.20 255.255.255.0 eq
br(config)# $
108.2.5 255.255.255.0 131.108.1.20 255.255.255.0 eq 45
After you complete the entry, press
Ctrl-A
to check the complete syntax before pressing the
Return
key
to execute the command. The dollar sign ($) appears at the end of the line to show that the line has been
scrolled to the right:
br(config)#
access-list 101 permit tcp 131.108.2.5 255.255.255.0 131.108.1
$
If you have a terminal screen width other than 80 columns, use the
terminal width
privileged EXEC
command to set the width of your terminal.
Use line wrapping with the command history feature to recall and modify previous complex command
entries. For information about recalling previous command entries, see the
“Editing Commands Through
Keystrokes” section on page 6-8
.
Searching and Filtering Output of show and more Commands
You can search and filter the output for
show
and
more
commands, which is useful when sorting through
large amounts of output or when excluding output.
To use this functionality, enter a
show
or
more
command followed by the
pipe
character (|), one of the
keywords
begin
,
include
, or
exclude
, and an expression that you want to search for or filter out:
command
|
{
begin
|
include
|
exclude
}
regular-expression
Expressions are case sensitive. For example, if you enter
| exclude output
, the lines that contain
output
are not displayed, but the lines that contain
Output
are displayed.
This example shows how to include in the output display only lines where the expression
protocol
appears:
br#
show interfaces | include protocol
Vlan1 is up, line protocol is up
Vlan10 is up, line protocol is down
GigabitEthernet0/1 is up, line protocol is down
GigabitEthernet0/2 is up, line protocol is up