Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
498 views
in Technique[技术] by (71.8m points)

pandas - How to convert Cisco Switch SVI configuration to Excel in python

I have a text file with thousands of Cisco switch SVI configuration that I want to convert to excel. How do I achieve this with python? I want each SVI information to be in separate rows.

Text file format:

interface Vlan2
 ip vrf forwarding CustomerA
 ip address 192.168.1.1 255.255.255.0
!
interface Vlan3
 ip vrf forwarding CustomerB
 ip address 192.168.2.1 255.255.255.0
!
interface Vlan4
 ip vrf forwarding CustomerC
 ip address 192.168.3.1 255.255.255.0
!
interface Vlan5
 ip vrf forwarding CustomerD
 ip address 192.168.4.1 255.255.255.0

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...