Looping through text file

Hi All

I need to change a text file that read top to bottom to a left to right .csv file.

Group Name: ABC123

Rule Name: ABC-Out

Remote Network: xxx.xxx.xxx.xxx

Rule Name: ABC-In

Local Network: xxx.xxx.xxx.xxx

Rule Name: ZXC987

Remote Network: xxx.xxx.xxx.xxx

Group Name: AAA-Group

Rule Name: AAA-123-Out

Remote Network: xxx.xxx.xxx.xxx

There is no set amount of rules per group...

I don't know how to loop all the rules listed under each group???

The goal would be Rules.csv

Group Name,Rule Name,Remote Network

ABC123, ABC-Out, xxx.xxx.xxx.xxx

ABC123, ABC-In, xxx.xxx.xxx.xxx

ABC123, ZXC987, xxx.xxx.xxx.xxx

ABC-Group,ABC-123-OUT, xxx.xxx.xxx.xxx

Thanks for your time and help

Graham



August 24th, 2015 3:51am

Hi All

I need to change a text file that read top to bottom to a left to right .csv file.


Please post your script and explain what you have a problem with.
Free Windows Admin Tool Kit Click here and download it now
August 24th, 2015 5:32am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics