1

Merge multiple lines in same file with common key using awk

view story
linux-howto

http://www.unix.com – I've been a Unix admin for nearly 30 years and never learned AWK. I've seen several similar posts here, but haven't been able to adapt the answers to my situation. AWK is so damn cryptic! ;) I have a single file with ~900 lines (CSV list). Each line starts with an ID, but with different stuff after it which I want to merge onto a single line. Sometimes there are just a couple of lines to be merge, sometimes there are 4 or 5. The input file is already sorted. Here's an example: Code: 2,"URL","website","aaa.com" 2,"abc","text"," (HowTos)