5-103
Cisco IOS XR Getting Started Guide for the Cisco XR 12000 Series Router
OL-24755-01
Chapter 5 CLI Tips, Techniques, and Shortcuts
Displaying System Information with show Commands
0 drops for unrecognized upper-level protocol
MgmtEthernet0/0/CPU0/0 is administratively down, line protocol is administratively
down
MgmtEthernet0/0/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 begin keyword 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/0/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 pos0/2/0/0
interface pos0/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.”