I want to concatenate 2-columns by 2-columns separated by colon. How can I do so? For example, I have a text file containing 6 columns separated by tab. I want to concatenate column 1 and 2; column 3 and 4; column 5 and 6, respectively, and put a colon in between.
Thank for the code. I know it can be done with awk. However, I have to concatenate for 200,000 columns. Is there any code to concatenate all 200,000 columns?
---------- Post updated at 08:28 AM ---------- Previous update was at 08:21 AM ----------
Dear Subbeh,
I found out my mistake. The text file I posted was separated by space while my original file was separated by tab. Your script works too. Thank you very much.