Cisco Systems A9K24X10GETR, ASR 9000, A9KMOD80TR manual Adding a Filter at the --More-- Prompt, 5-10

Models: A9KMOD80TR A9K24X10GETR ASR 9000

1 142
Download 142 pages 58.88 Kb
Page 112
Image 112
Adding a Filter at the --More-- Prompt

Chapter 5 CLI Tips, Techniques, and Shortcuts

Viewing System Information with show Commands

F I N A L D R A F T — C i s c o C o n f i d e n t i a l

Gi0/2/0/0 is administratively down, line protocol is administratively down 0 drops for unrecognized upper-level protocol

Gi0/2/0/1 is administratively down, line protocol is administratively down 0 drops for unrecognized upper-level protocol

Gi0/2/0/2 is administratively down, line protocol is administratively down 0 drops for unrecognized upper-level protocol

Gi0/2/0/3 is administratively down, line protocol is administratively down 0 drops for unrecognized upper-level protocol

MgmtEthernet0/RSP0/CPU0/0 is administratively down, line protocol is administratively down

MgmtEthernet0/RSP0/CPU0/0 is administratively down, line protocol is administratively down

0 drops for unrecognized upper-level protocol

Note Filtering is available for submodes, complete commands, and anywhere that <cr> appears in the “?” output.

Adding a Filter at the --More-- Prompt

You can specify a filter at the --More--prompt of a show command output by entering a forward slash (/) followed by a regular expression. The filter remains active until the command output finishes or is interrupted (using Ctrl-Z or Ctrl-C). The following rules apply to this technique:

If a filter is specified at the original command or previous --More--prompt, a second filter cannot be applied.

The use of the keyword begin does not constitute a filter.

The minus sign (–) preceding a regular expression displays output lines that do not contain the regular expression.

The plus sign (+) preceding a regular expression displays output lines that contain the regular expression.

In the following example, the user adds a filter at the --More--prompt to show only the lines in the remaining output that contain the regular expression “ip.”

RP/0/RSP0/CPU0:router# show configuration running begin line

Building configuration...

line console exec-timeout 120 120

!

logging trap --More--

/ip filtering...

ip route 0.0.0.0 255.255.0.0 Gi0/2/0/0 interface Gi0/2/0/0

ip address 172.19.73.215 255.255.0.0 end

Tip On most systems, Ctrl-Z can be entered at any time to interrupt the output and return to EXEC mode.

For more information, see Appendix A, “Understanding Regular Expressions, Special Characters, and Patterns.”

 

Cisco ASR 9000 Series Aggregation Services Router Getting Started Guide

5-10

OL-17502-01

Page 112
Image 112
Cisco Systems A9K24X10GETR, ASR 9000, A9KMOD80TR manual Adding a Filter at the --More-- Prompt, 5-10