here is sample script showing lines from "find.txt" file those are into "findinto.txt"
common.py find.txt findinto.txt
import os
import re
import sys
fileHandle = open (sys.argv[1])
linesToPatch = fileHandle.readlines()
f = open(sys.argv[2])
for aline in f:
for rline in linesToPatch:
p=re.compile(rline.strip())
if p.search(aline.strip()):
print aline
No comments:
Post a Comment