Skip to content
Advertisement

Python – Output hostname and config

I have a script that runs through a list of hostnames/IPs and outputs to a csv “hostname, output”, in the same cell.

I need that the Hostname stays in cell A1, and the Output stays on Cell B1 (and so on – A2 B2 etc)

Can you help me?

The code is this:

JavaScript

Advertisement

Answer

I need that the Hostname stays in cell A1, and the Output stays on Cell B1 (and so on – A2 B2 etc)

routers.csv file

JavaScript

I think this is what you need

JavaScript

EDIT:

Updated Python script to read csv file using csv.reader()

output.csv file

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement