Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- |Username|Host|Connected|Idletime|ECM|EMM|Version|Lastusedshare|
- |astracanal|188.95.48.8|00d00:09:43|00d00:04:30|14(0)|0(0)|2.1.3|0604:000000:1bc0(nok)|
- |canalnl|82.72.48.10|00d00:09:41|00d00:09:41|0(0)|571(571)|2.1.2||
- |telesatt|94.23.36.22|00d00:09:41|00d00:02:10|6(0)|0(0)|2.1.2|0604:000000:119a(nok)|
- |dream9|41.226.253.19|00d00:09:40|00d00:04:31|29(3)|58(58)|2.1.4|0604:000000:02c4(nok)|
- |dream10|85.218.13.10|00d00:07:09|00d00:00:06|59(56)|0(0)|2.1.3|0500:021110:01ae(ok)|
- |papa|192.168.1.13|00d00:00:56|00d00:00:56|1(1)|0(0)|2.1.3||
- |Username|Shareinfo|
- |astracanal|local0604:00000014(0)||canalnl||
- |telesatt|local0604:0000006(0)|
- |dream9|local0604:00000025(0)|
- ||remote0500:0424004(3)|
- step3:
- #!/usr/bin/env python
- # -*- coding: UTF-8 -*-
- #
- from csv import reader, writer
- outs = dict((s, writer(open('outputfile' + s, 'w'), delimiter='|')) for s in ['2.1.3'])
- for row in reader(open('cli1.txt'), delimiter='|'):
- if row[6] in outs:
- outs[row[6]].writerow([row[1]])
- my output is: (outputfile2.1.3)
- 188.95.48.8
- 85.218.13.10
- 192.168.1.13
- but i need all the ips in outputfile2.1.3 file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement