118
Cisco ASR 9000 Series Aggregation Services Router Getting Started Guide
OL-28417-02
Chapter CLI Tips, Techniques, and Shortcuts
Displaying System Information with show Commands
In the following example, the show interface command includes only lines in which the expression
“protocol” appears:
RP/0//CPU0:router# show interface | include protocol
Null0 is up, line protocol is up
0 drops for unrecognized upper-level protocol
/2/0/0 is administratively down, line protocol is administratively down
0 drops for unrecognized upper-level protocol
/2/0/1 is administratively down, line protocol is administratively down
0 drops for unrecognized upper-level protocol
/2/0/2 is administratively down, line protocol is administratively down
0 drops for unrecognized upper-level protocol
/2/0/3 is administratively down, line protocol is administratively down
0 drops for unrecognized upper-level protocol
MgmtEthernet0//CPU0/0 is administratively down, line protocol is administratively
down
MgmtEthernet0//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.
show command | file device0:path/file
Saves output of the show command to the specified file on the specified
device.
show command | utility name
Displays a set of UNIX utilities:
• cut—Cuts characters or lines from the output displayed from standard
input or a file.
• egrep—Searches a file using full regular expressions.
• fgrep—Searches a file for a fixed character string.
• head—Copies bytes or lines at the beginning of the output displayed
from standard input or a file.
• less—Displays the output of a file in a page-by-page manner.
• sort—Sorts, merges, or sequence-checks the output displayed from
standard input or a file.
• tail—Copies the end portion of the output displayed from standard
input or a file.
• uniq—Displays or removes repeated lines in a file.
• wc—Count words, lines, or bytes in a file.
• xargs—Invokes a program from one or more argument lists.
Table 25 show Command Filter Options
Command Description