<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Turning a Multi-Line File Into a CSV File</title>
	<atom:link href="http://www.thenumber42.net/2008/04/10/turning-a-multi-line-file-into-a-csv-file/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thenumber42.net/2008/04/10/turning-a-multi-line-file-into-a-csv-file/</link>
	<description>Mostly about software testing, but a little bit about life, the universe, and everything</description>
	<lastBuildDate>Thu, 05 Nov 2009 18:13:38 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Isaac</title>
		<link>http://www.thenumber42.net/2008/04/10/turning-a-multi-line-file-into-a-csv-file/comment-page-1/#comment-394</link>
		<dc:creator>Isaac</dc:creator>
		<pubDate>Tue, 21 Oct 2008 16:36:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.thenumber42.net/?p=95#comment-394</guid>
		<description>&lt;blockquote&gt;&lt;p&gt;hi, appriecate if you could help me,&lt;br&gt;
i have a very long log file where the contents is like below:&lt;/p&gt;
&lt;p&gt;AAA = 34234&lt;br&gt;
BBB = somedata&lt;br&gt;
CCC = somedata2&lt;br&gt;
DDD = 94383058&lt;br&gt;
…..&lt;/p&gt;
&lt;p&gt;i need to convert this file to &lt;/p&gt;
&lt;p&gt;34234;somedata;somedata2;94383058&lt;/p&gt;
&lt;p&gt; and I tried to use “tr” command but failed, maybe because the end of line is not \n&lt;br&gt;
is there any other command can process this log file ?&lt;br&gt;
really appreciate your help on this&lt;br&gt;
thanks&lt;/p&gt;
&lt;/blockquote&gt;

Something like this requires chaining a few commands together.  One of the great strengths of Linux is the existence of many &quot;small&quot; commands that can be chained together.

First, as you indicated, the line ending may need to be adjusted.  Try running 
&lt;code&gt;
dos2unix &lt;file&gt;
&lt;/code&gt;
on the file and then try &quot;tr&quot; again.

Also, it looks like you want to get rid of all the &#039;=&#039; signs in you log files. Try this:
&lt;code&gt;
cat &lt;file&gt; &#124; sed -r &#039;s/^\w+\s+=\s+//&#039; &#124; tr &#039;\n&#039; &#039;;&#039;
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<blockquote><p>hi, appriecate if you could help me,<br />
i have a very long log file where the contents is like below:</p>
<p>AAA = 34234<br />
BBB = somedata<br />
CCC = somedata2<br />
DDD = 94383058<br />
…..</p>
<p>i need to convert this file to </p>
<p>34234;somedata;somedata2;94383058</p>
<p> and I tried to use “tr” command but failed, maybe because the end of line is not \n<br />
is there any other command can process this log file ?<br />
really appreciate your help on this<br />
thanks</p>
</blockquote>
<p>Something like this requires chaining a few commands together.  One of the great strengths of Linux is the existence of many &#8220;small&#8221; commands that can be chained together.</p>
<p>First, as you indicated, the line ending may need to be adjusted.  Try running<br />
<code><br />
dos2unix &lt;file&gt;<br />
</code><br />
on the file and then try &#8220;tr&#8221; again.</p>
<p>Also, it looks like you want to get rid of all the &#8216;=&#8217; signs in you log files. Try this:<br />
<code><br />
cat &lt;file&gt; | sed -r 's/^\w+\s+=\s+//' | tr '\n' ';'<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: razak</title>
		<link>http://www.thenumber42.net/2008/04/10/turning-a-multi-line-file-into-a-csv-file/comment-page-1/#comment-384</link>
		<dc:creator>razak</dc:creator>
		<pubDate>Thu, 16 Oct 2008 07:23:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.thenumber42.net/?p=95#comment-384</guid>
		<description>hi, appriecate if you could help me,
i have a very long log file where the contents is like below:

AAA = 34234
BBB = somedata
CCC = somedata2
DDD = 94383058
.....

i need to convert this file to 

34234;somedata;somedata2;94383058

 and I tried to use &quot;tr&quot; command but failed, maybe because the end of line is not \n
is there any other command can process this log file ? 
really appreciate your help on this
thanks</description>
		<content:encoded><![CDATA[<p>hi, appriecate if you could help me,<br />
i have a very long log file where the contents is like below:</p>
<p>AAA = 34234<br />
BBB = somedata<br />
CCC = somedata2<br />
DDD = 94383058<br />
&#8230;..</p>
<p>i need to convert this file to </p>
<p>34234;somedata;somedata2;94383058</p>
<p> and I tried to use &#8220;tr&#8221; command but failed, maybe because the end of line is not \n<br />
is there any other command can process this log file ?<br />
really appreciate your help on this<br />
thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>
