Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All
     

    Related Documentation

     

    Filtering show Commands

    You have access to a variety of show commands that display router and protocol information. You can filter the output of a show command by specifying | (the UNIX pipe symbol), one of the following keywords, and either a case-sensitive text string or a regular expression.

    • begin—Displays output beginning with the first line that contains the text string or regular expression
    • include—Displays output lines that contain the text string or regular expression and excludes lines that do not contain the text string or regular expression
    • exclude—Displays output lines that do not contain the text string or regular expression and excludes lines that do contain the text string or regular expression

    You can press Ctrl+c to interrupt the show command output.

    Note: The router does not recognize beginning spaces of the text string. For example, if you enter the include option with IP as the text string on which to filter, the router ignores the space and displays lines that include words such as RIP.

    In the following example, the output display consists only of lines that contain the string ip. The router omits all other lines of the output from the display because none of them contain the string ip.

    host1#show config include-defaults | include ip
    ! Configuration script generated on FRI NOV 12 1999 16:56:41 UTC
    ip address 192.168.1.229 255.255.255.0
    ip rip receive version 2 1
    ip rip send version 1
    ip rip authentication mode md5 17
    ip rip authentication key
    ip route 10.6.0.0 255.255.0.0 192.168.1.1
    ip route 10.10.0.0 255.255.0.0 192.168.1.1
    ip route 10.10.0.166 255.255.255.255 192.168.1.1
    ip debounce-time 0
    router rip
     

    Related Documentation

     

    Published: 2014-08-18