I'm in a same situation but what I'm trying to achieve is slight different.
Match and then merge output file
1, one two three
2, four five six
Here I don't want "one" to be repeated.