User Tools

Site Tools


Find all interfaces matching with a certain pattern - Cisco IOS

Here an example with the description field

sh int desc | i DHKESXDDPCOP00+

This will yield the following

Gi1/0/4                        up             up       DHKESXDDPCOP001 SC
Gi1/0/5                        up             up       DHKESXDDPCOP004 SC
Gi1/0/6                        up             up       DHKESXDDPCOP002 SC
Gi1/0/12                       up             up       DHKESXDDPCOP003 SC
Gi2/0/4                        up             up       DHKESXDDPCOP001 DD
Gi2/0/5                        up             up       DHKESXDDPCOP004 DD
Gi2/0/6                        up             up       DHKESXDDPCOP002 DD
Gi2/0/12                       up             up       DHKESXDDPCOP003 DD
Gi3/0/4                        up             up       DHKESXDDPCOP001 NFS
Gi3/0/5                        up             up       DHKESXDDPCOP004 NFS
Gi3/0/6                        up             up       DHKESXDDPCOP002 NFS
Gi3/0/12                       up             up       DHKESXDDPCOP003 NFS
Gi4/0/4                        up             up       DHKESXDDPCOP001 NFS
Gi4/0/5                        up             up       DHKESXDDPCOP004 NFS
Gi4/0/6                        up             up       DHKESXDDPCOP002 NFS
Gi4/0/12                       up             up       DHKESXDDPCOP003 NFS

sh = show

int = interface

desc = description

DHKESXDDPCOP00+ = all descriptors matching DHKESXDDPCOP00 and whatever follows on that line (indicated by the +

<!-- AddThis Button BEGIN -->
<a class="addthis_button" href=";username=xa-4beeaaab61b514bf"><img src="" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript" src=""></script>
<!-- AddThis Button END -->

Share this knowledge with your friends!

howto_sh_pattern_and_interface_cisco.txt · Last modified: 2012/03/09 10:43 (external edit)