in reply to replace data based on duplicate in another file
If you can outline the logic, writing the program is trivial. OTOH, if you don't know how to solve the problem, you can't write the program.