in reply to Unify two files

What exactly are you trying to accomplish? You write about "unifying two files", which could mean replacing those two scripts with one, but you also write about your output. Are you trying to write a third script, that "unifies" the output of those two scripts into a combined list (without duplicates, for example)?

If possible, try looking at your problem in terms of input and output. What is your input? What exactly do you want to produce? It's very difficult to guess what you mean by "unify".

- Luke