Created
December 4, 2017 20:31
-
-
Save kafkaesqu3/f2c9774b07981ddd7b43d194660022af to your computer and use it in GitHub Desktop.
Expands csv file from format key1,var1,var2 into key1,var1 \n key1,var2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| file = open('title-cve.txt', 'r') | |
| output = open('title-cve-out.txt', 'w') | |
| for line in file: | |
| tmp = line.split('|') | |
| title = tmp[0] | |
| cvelist = tmp[1].split(',') | |
| for cve in cvelist: | |
| output.write(tmp[0] + '|' + cve + '\n') | |
| file.close | |
| output.close |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment