I have attached a text file with output from some commands. I need a python script that turns it into a formatted CSV.
Current Example of the output (this is in the attached txt file):
switch-sw9#show int status | in connected.*716
Fa3/0/8 connected 716 a-full a-100 10/100BaseTX
Fa3/0/12 connected 716 a-full a-100 10/100BaseTX
switch-sw11#show int status | in connected.*716
Gi1/0/45 connected 716 a-full a-100 10/100/1000BaseTX
Gi1/0/46 connected 716 a-full a-100 10/100/1000BaseTX
I need it to be separated into columns in a CSV. Should look like:
switch-sw9,Fa3/0/8, connected,716, a-full,a-100,10/100BaseTX
switch-sw9,Fa3/0/12, connected,716, a-full,a-100,10/100BaseTX
switch-sw11,Gi1/0/45, connected,716, a-full,a-100,10/1000BaseTX
switch-sw11,Gi1/0/46, connected,716, a-full,a-100,10/1000BaseTX
Looking for a quick turn around. Please only bid or message if you understand the project. The text file with the original output is attached.