#fIn = 'queries_tmp.txt'
#fOut = 'queries.txt'
fIn = 'tmp.txt'
fOut = 'tmp2.txt'

fdIn = open(fIn, 'r')
fdOut = open(fOut, 'w')
for line in fdIn:
    if 'FROM CACHE' in line: continue
    fdOut.write(line)
#    if 'QPE' in line or 'NBRR' in line or 'NCAS' in line:
#        fdOut.write(line)
fdIn.close()
fdOut.close()
