cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
847
Views
0
Helpful
10
Replies

Filtering Command

RashikaBatra
Level 1
Level 1

I only want to filter out the names of the interfaces of  a switch using the command "Show interface status". How can I apply filtering to this command?

1 Accepted Solution

Accepted Solutions

now i feel look bright your explantion :

 

https://pynet.twb-tech.com/blog/netmiko-python-library.html

 

i used document - get dynamic VLAN all over my network 1000 switches, good to get in to CSV and use later..

 

good learning.

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

View solution in original post

10 Replies 10

balaji.bandi
Hall of Fame
Hall of Fame

if the port have description, you can do below : (if not please let us know)

 

#show interfaces description

 

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Jitendra Kumar
Spotlight
Spotlight

#sh ip int brief

Thanks,
Jitendra

RashikaBatra
Level 1
Level 1

Actually I am writing a python script ...so I want to  filter out only the names of the interfaces to append them to a separate python list.

give some example for to suggest better ?

 

command level give us the output with show commands ?

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

this is command reference 

show interfaces [interface interface-number] status [err-disabled | module number | vlan vlan]

Joseph W. Doherty
Hall of Fame
Hall of Fame

You might also pipe the output and possibly "include" or "exclude" what you want to capture from your show interface status command.

RashikaBatra
Level 1
Level 1

My problem got solved using use_textfsm = True in the netmiko library.

Thank You.

textfsm, TTS, genie - good modules (i used lot)

 

since we do not know your requirement - we are not suggested or given advise as expected.

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

I was supposed to filter out the output of the command show interface status to get only the interface names.

now i feel look bright your explantion :

 

https://pynet.twb-tech.com/blog/netmiko-python-library.html

 

i used document - get dynamic VLAN all over my network 1000 switches, good to get in to CSV and use later..

 

good learning.

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

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