Thursday, 22 August 2013

How do I convert the following log file to CSV type file?

How do I convert the following log file to CSV type file?

I have a log file formatted like this:
timestamp=123;
data1=value1;
data2=value2;
<-- empty line
timestamp=456;
data3=value3;
data4=value4;
What unix commands can I use to convert it to this format:
timestamp=123,data1=value1,data2=value2
timestamp=456,data3=value3,data4=value4

No comments:

Post a Comment