After windows died on my netbook I installed Lubuntu and discovered Gawk about a month ago. After using Excel for 10+ years I'm amazed how quick and easily Gawk can process data but I'm stuck with a little problem merging data from multiple lines.
I'm an SEO Consultant and provide monthly reports to clients which I'm currently revamping. Essentially I have a csv file similar to
Since the first two replies have already fixed the issue, (in fact I write with similar solution, but not quicker than others), Scrutinizer's code is just another solution, and shorter.
It is not my experience that "the user" doesn't know. Looking at the kind of input I got the impression it was produced through some form of automation which would make ordering more likely. Anyway, I am sure the OP is more than capable of determining if it fits his bill. If so, this script has minimal memory requirements, which might be advantageous under certain conditions, who knows...