For Programmers: Free Programming Magazines  


Home > Archive > AWK > October 2004 > Merging lines









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Merging lines
Engel

2004-10-16, 6:46 am

Hi,
I have a problem, hope someone can help
INPUT-file:

aaa;234;567;893
bbb;123;456;789
bbb;456;789;012
ccc;345;678;920
ccc;567;890;123
ccc;456;789;654

and I need an OUTPUT-file like this:

aaa;234;567;893
bbb;123;456;789;456;789;012
ccc;345;678;920;567;890;123;456;789;654

If the first field from current line matches the first field from next lines, then merge the lines to one line.

Thanks a lot
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com