PIPE Feature & Commands in Cisco IOS

Rashmi Bhardwaj | Blog,Config & Troubleshoot
Advertisements

Network administrators working on Cisco devices have to search through a lot of detailed information when they run IOS commands. This is when the “PIPE” function of Cisco IOS comes as a pretty helpful utility.

Let’s see what are the options we get after inputting PIPE “|” function.

R1#sh run | ?

Advertisements

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

We will use above options under PIPE to have more understanding on their usage

In below scenario , the command using PIPE will provide output of interfaces which are down –

Switch#show ip interface brief | include down

GigabitEthernet0/5         unassigned         YES         unset    down    down

GigabitEthernet0/6         unassigned         YES         unset    down    down

GigabitEthernet0/11       unassigned         YES         unset    down    down

GigabitEthernet0/17       unassigned         YES         unset    down    down

GigabitEthernet0/19       unassigned         YES         unset    down    down

GigabitEthernet0/21       unassigned         YES         unset    down    down

Below is output after issuing “show running-config | section bgp” command which displays only BGP section of the running configuration –

Router#show running-config | section bgp

router bgp 65111

bgp router-id 1.1.1.1

bgp log-neighbor-changes

neighbor 2.2.2.2 remote-as 65112

bgp graceful-restart

Next, with command “show run | begin interface” ,the output starts from the first occurence of the word “interface”.

Router#show run | begin interface

Interace FastEthernet0/0

No ip address

Shoutdown

Duplex auto

Speed auto

!

Interace FastEthernet0/0

No ip address

Shutdown

Duplex auto

Speed auto

Further , below are some more examples where PIPE function is used –

show interface status | include Vlan | connected

show ip int brief | exclude ^G

Hope you would have understood this cisco pipe commands cheat sheet.

Read some other related articles –

>Cisco Device Interface Description – Command & Configuration

> Cisco Datasheets 

 

ABOUT THE AUTHOR

Advertisements

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart
Select your currency
USD United States (US) dollar
Scroll to Top