Your second and third sentences contradict each other:
So I'm having trouble understanding what you want.* edit the code to do just compare the content of the line "NAME" * Don't compare the headers
Sample data, and expected results would help.
Once it hits the fan, the only rational choice is to sweep it up, package it, and sell it as fertilizer.