我有一个像这样的文本文件
client interface: GigabitEthernet10/0/0.100 is up
active state: up
line state: up
vc state: down
...
colour: -
client interface: EthTrunk10.0.1 is up
active state: up
line state: up
vc state: down
...
colour: -
列表可以很长,大约有5000-10000行文本
有没有更好的办法把它转换成下面这样的表格形式
Client Interface Active State Line State VC State ... Color
GigabitEthernet10/0/0.100 up up down -
EthTrunk10.0.1 up up down -
假设您知道每个接口的列数:
输出:
我想这就是你要找的。因为我不知道每个接口包含的内容的确切数量,所以我首先找到了头,然后在里面循环
要导入熊猫,请使用以下方法:
相关问题 更多 >
编程相关推荐