You are on page 1of 1

import sys import re import string def rep(f,v,r): f=open(f,'Ur') out=open("output.txt",'w') f=f.readlines() for x in f: if re.findall("Version",x): x=x.replace(v,r) out.

write(x) else: out.write(x) rep(sys.argv[1],sys.argv[2],sys.argv[3]) copy the above code and save as rep.py install python on the system then open cmd -> cd C:\Python27 python path-of-rep.py input-file.txt 1.0.0.0 1.0.11.12345 the above must be in same order that i provide. it will produce a output.txt that you want. it will be in C:\python27 gud luck :) if any problem as me

You might also like