[Tutor] Searching 2 Strings in A File

Prasad, Ramit ramit.prasad at jpmorgan.com
Wed Jun 6 23:13:35 CEST 2012

Please respond back to the list (so others know what worked 
and that the problem is solved).  


> hi all,
> thanks a lot for your quick response.
> Dave, actually it's a 2 arguments.  Sorry, i did not make it clear in my
> question.  I used Ramit's hint and it worked.  The code should be as follows:
> pattern = "({0}|{1})".format(x,y)
> cmd_line = Popen(["egrep", pattern, aLogFile], stdout=PIPE, stdin=PIPE,
> stderr=STDOUT)
> Regards,
> Do Nguyen


Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology
712 Main Street | Houston, TX 77002
work phone: 713 - 216 - 5423


This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  

More information about the Tutor mailing list