Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

when to use | and inc option in show command

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
New Member

Re: when to use | and inc option in show command

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.

2 REPLIES
New Member

Re: when to use | and inc option in show command

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.

New Member

Re: when to use | and inc option in show command

Hi

thanks for your reply

it worked for me now

291
Views
0
Helpful
2
Replies