cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
613
Views
0
Helpful
2
Replies

when to use | and inc option in show command

mahesh18
Level 6
Level 6

Hi

Can someone explain me when we use the |

and inc option in show command.

what is purpose of using the | and inc option

1 Accepted Solution

Accepted Solutions

i-kendall
Level 1
Level 1

It is used to filter the output from the show command to only include the bit you type after the 'inc'. For example, if I have a large config, and I need to see all the 'ip route' commands only, the a 'show run | inc route' command will show all the ip route commands. It will also show any route map commands as these lines also include the same word. I usually find that the '| begin' is more useful, as it is easier to start at the right point. Both are useful when needed, but are most used when the config is large.

Hope that explians it a little. Just get used to using it and you will discover how useful it can be.

View solution in original post

2 Replies 2

i-kendall
Level 1
Level 1

It is used to filter the output from the show command to only include the bit you type after the 'inc'. For example, if I have a large config, and I need to see all the 'ip route' commands only, the a 'show run | inc route' command will show all the ip route commands. It will also show any route map commands as these lines also include the same word. I usually find that the '| begin' is more useful, as it is easier to start at the right point. Both are useful when needed, but are most used when the config is large.

Hope that explians it a little. Just get used to using it and you will discover how useful it can be.

Hi

thanks for your reply

it worked for me now

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card