On 06/06/2012 05:10 PM, dohoang4...@comcast.net wrote: > hi all, (You forgot to include the list in your reply)
> > 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 > If it's two arguments, then you need pattern1 and pattern2. But if it works, perhaps egrep is happy with a single argument. -- DaveA -- http://mail.python.org/mailman/listinfo/python-list