I have the following files with the following content ( one line per file:
<189>162: CSR-1000V: *Sep 27 06:17:02: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback317, changed state to up <189>165: CSR-1000V: *Sep 27 06:17:07: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback320, changed state to up <189>164: CSR-1000V: *Sep 27 06:17:06: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback319, changed state to up <189>161: CSR-1000V: *Sep 27 06:16:59: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback316, changed state to up<189>163: CSR-1000V: *Sep 27 06:17:04: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loop
I want to create a python script that can add those to a single file ( output.txt ), but i am stuck, since i am using for loop and the script keeps add the existing lines over and over
Any ideas?
Thank you