FILE NAME | begin
| count | include
| exclude |
linnum | more |
nomore | save
FILE NAME}
regular-
expression
Searches and filters the command output. This
functionality is useful if you need to sort through a
large output or if you want to exclude irrelevant
output.
append: appends the command output to a file. You are
prompted for a file name
begin: begins an unfiltered output of the command with
the first line containing the regular expression
count: counts the output-lines number
include: displays output lines that contain the regular
expression
exclude: displays output lines that do not contain the
regular expression
linnum: enumerates lines in the output
more: enables the output pagination
nomore: disables the output pagination
save: saves the command output to a file. You are
prompted for a file name
regular-expression: see Table 8–2
Example 1:
The below example displays only lines that contain 9.
device-name#show port | include .*9.*
9 1/1/7 enable down unknown disable disable 0001
11 1/1/9 enable down unknown disable disable 0001
19 1/2/1 enable down unknown disable disable 0001
29 1/4/1 enable down unknown disable disable 0123
Example 2:
The below example displays only lines that do not contain 2.
device-name#show vlan | exclude 2
=======================================================================
Name |VTag| Rout If | Tagged ports | Untagged ports
--------------------+----+---------+---------------------+-------------
default |1 |sw0 | |
10 |10 |sw10 | |1/1/9
Svc10 |4097| | |
Example 3:
It is also possible to display the output starting at
the first match of a regular expression, using the
begin keyword.
device-name#show vlan | begin .*2.*
20 |20 |sw20 | |1/1/2
30 |30 |sw30 | |1/2/8
40 |40 |sw40 | |1/2/5
Svc10 |4097| | |
Svc20 |4098| | |