Merging a couple of text files
<p>Ok, so I need to do this with a couple of text files I have.
I need to merge the two files like this.</p>

<p>FILE 1 and FILE 2 need to become FILE 3.</p>

<p>FILE 1:</p>

<pre><code>ABC:123
TUV:678
QRS:456
</code></pre>

<p>FILE 2:</p>

<pre><code>123:XXX
678:EEE
456:DDD
</code></pre>

<p>FILE 3:</p>

<pre><code>ABC:123:XXX
TUV:678:EEE
QRS:456:DDD
</code></pre>

<p>As you can see above, the second item is common in both FILE 1 and FILE 2. I just need to merge all items in FILE 1 and FILE 2 that have a common item like they are in FILE 3. I'd prefer to use grep, sed, cut, etc.</p>