Searching for a list of strings in a file with Python

2013-10-13 Thread Starriol
Hi guys, I'm trying to search for several strings, which I have in a .txt file line by line, on another file. So the idea is, take input.txt and search for each line in that file in another file, let's call it rules.txt. So far, I've been able to do this, to search for individual strings: [cod

Re: Consolidate several lines of a CSV file with firewall rules [PS]

2013-10-11 Thread Starriol
On Friday, October 11, 2013 5:50:06 PM UTC-3, Tim Chase wrote: > On 2013-10-11 15:40, Tim Chase wrote: > > > the dangling open-quotes on #1 that cause most CSV parsers to read > > > until the subsequent line is read. > > > > And by "subsequent line", I mean "subsequent closing-quote" of > > c

Consolidate several lines of a CSV file with firewall rules

2013-10-11 Thread Starriol
Hi guys. I have a CSV file, which I created using an HTML export from a Check Point firewall policy. Each rule is represented as several lines, in some cases. That occurs when a rule has several address sources, destinations or services. I need the output to have each rule described in only one l