Using the Pipe The pipe

Using the Pipe
The pipe (
|
) allows you to wade through all the configurations or other long outputs and get
straight to your goods fast. Table 1.5 shows the pipe commands.
Here’s an example of using the pipe command to view just interface information on a router:
Router#sh run | ?
append Append redirected output to URL (URLs supporting append operation
only)
begin Begin with the line that matches
exclude Exclude lines that match
include Include lines that match
redirect Redirect output to URL
section Filter a section of output
tee Copy output to URL
!
Router#sh run | begin interface
interface FastEthernet0/0
description Sales VLAN
ip address 10.10.10.1 255.255.255.248
duplex auto
speed auto
!
TABLE 1 . 5 Pipe Commands
Command Meaning
Router#sh running-config | ? Shows the options for the pipe command.
These include the ability to
begin, include, exclude, and so on.
Router#sh run | begin interface Shows the running configuration,
beginning at the interface
configurations.
Router#sh ip route | include 192.168.3.32 Shows all entries in the IP routing
table that include the IP address
192.168.3.32