import re

file = open("file.txt", "r")

for line in file:
   print line
   line= line.replace('\n','')
   temp = open(line, "r+")
   for line1 in fileinput.input(temp, inplace=True):
       if "ultralisk.cs.washington.edu" in line1:
          printZZ( line1.replace("ultralisk.cs.washington.edu", "130.245.144.36" ) )
         # line1.replace("ultralisk.cs.washington.edu","130.245.144.36")
       if "/pages/" in line1:
          temp.write( line1.replace("/pages/","/server/pages/") )
	  #line1.replace("/pages/","/server/pages/")
       if "/missing/" in line1:
          temp.write( line1.replace("/missing/","/server/missing/") )
          #line1.replace("/missing/","/server/missing/")
   temp.close()

file.close()
   
