What is the best method to match a pattern in set of lines

Terminator manidevarajan at gmail.com
Fri Jun 19 20:52:05 EDT 2009


Hello,
 My requierment is to get the "Stick Tag" value from the below o/p and
based on tag take different actions. What is the best way to implement
it. I am new to Python, so appreciate any input.

Command o/p:
===================================================================
File: Packet.tcl        Status: Needs Merge

   Working revision:    1.2.98      Result of merge
   Repository revision: 1.2.99      /auto/quality/CVS/tools/ext/
Packet.tcl,v
   Sticky Tag:          rel-ip-branch (branch: 1.584.2)
   Sticky Date:         (none)
   Sticky Options:      (none)

Requirement:
If "Sticky Tag" is rel-ip-brach
  do A
else "Sticky Tag" is rel-ipv6-branch
  do B

Thanks in advance.



More information about the Python-list mailing list