in reply to Input Output file

Show us what you've written so far, and we'll help you with any problems you've encountered.

Revised: Here's a clue. Take a look at merge files by column (revisted)