<?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: Unix Sed Tutorial: Multi-Line File Operation with 6 Practical Examples</title>
	<atom:link href="http://www.thegeekstuff.com/2009/11/unix-sed-tutorial-multi-line-file-operation-with-6-practical-examples/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thegeekstuff.com/2009/11/unix-sed-tutorial-multi-line-file-operation-with-6-practical-examples/</link>
	<description>Guides, HowTos and Tips for Technology Geeks</description>
	<lastBuildDate>Wed, 17 Mar 2010 06:04:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Masood</title>
		<link>http://www.thegeekstuff.com/2009/11/unix-sed-tutorial-multi-line-file-operation-with-6-practical-examples/comment-page-1/#comment-30930</link>
		<dc:creator>Masood</dc:creator>
		<pubDate>Mon, 25 Jan 2010 23:31:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=2473#comment-30930</guid>
		<description>In Example 5,the output is only last line and not last two lines.Can you confirm plz?</description>
		<content:encoded><![CDATA[<p>In Example 5,the output is only last line and not last two lines.Can you confirm plz?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Masood</title>
		<link>http://www.thegeekstuff.com/2009/11/unix-sed-tutorial-multi-line-file-operation-with-6-practical-examples/comment-page-1/#comment-30927</link>
		<dc:creator>Masood</dc:creator>
		<pubDate>Mon, 25 Jan 2010 23:12:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=2473#comment-30927</guid>
		<description>In Example 4 ,if total number of lines in sample script are even including blank lines then I think we can also use  following sed command
sed &#039;N;$d&#039; thegeekstuff.txt</description>
		<content:encoded><![CDATA[<p>In Example 4 ,if total number of lines in sample script are even including blank lines then I think we can also use  following sed command<br />
sed &#8216;N;$d&#8217; thegeekstuff.txt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Unix Sed Tutorial : 7 Examples for Sed Hold and Pattern Buffer Operations</title>
		<link>http://www.thegeekstuff.com/2009/11/unix-sed-tutorial-multi-line-file-operation-with-6-practical-examples/comment-page-1/#comment-25397</link>
		<dc:creator>Unix Sed Tutorial : 7 Examples for Sed Hold and Pattern Buffer Operations</dc:creator>
		<pubDate>Wed, 09 Dec 2009 06:03:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=2473#comment-25397</guid>
		<description>[...] &#8212;  sed printing, sed deletion, sed substitute , sed file write, sed multiple commands, sed multi-line operation, and sed manipulate file [...]</description>
		<content:encoded><![CDATA[<p>[...] &#8212;  sed printing, sed deletion, sed substitute , sed file write, sed multiple commands, sed multi-line operation, and sed manipulate file [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Destillat KW48-2009 &#124; duetsch.info - GNU/Linux, Open Source, Softwareentwicklung, Selbstmanagement, Vim ...</title>
		<link>http://www.thegeekstuff.com/2009/11/unix-sed-tutorial-multi-line-file-operation-with-6-practical-examples/comment-page-1/#comment-23805</link>
		<dc:creator>Destillat KW48-2009 &#124; duetsch.info - GNU/Linux, Open Source, Softwareentwicklung, Selbstmanagement, Vim ...</dc:creator>
		<pubDate>Fri, 27 Nov 2009 09:37:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=2473#comment-23805</guid>
		<description>[...] Unix Sed Tutorial: Multi-Line File Operation with 6 Practical Examples [...]</description>
		<content:encoded><![CDATA[<p>[...] Unix Sed Tutorial: Multi-Line File Operation with 6 Practical Examples [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sasikala</title>
		<link>http://www.thegeekstuff.com/2009/11/unix-sed-tutorial-multi-line-file-operation-with-6-practical-examples/comment-page-1/#comment-23656</link>
		<dc:creator>Sasikala</dc:creator>
		<pubDate>Thu, 26 Nov 2009 04:28:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=2473#comment-23656</guid>
		<description>Yes Berry, you are absolutely correct.</description>
		<content:encoded><![CDATA[<p>Yes Berry, you are absolutely correct.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Berry</title>
		<link>http://www.thegeekstuff.com/2009/11/unix-sed-tutorial-multi-line-file-operation-with-6-practical-examples/comment-page-1/#comment-23567</link>
		<dc:creator>Berry</dc:creator>
		<pubDate>Wed, 25 Nov 2009 14:41:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=2473#comment-23567</guid>
		<description>In Example 2, I think the command provided in the article only works when the number of consecutive blank lines is even. Because in the left part, sed &#039;/./=&#039; only print the line number before the non-blank line, the blank line is not changed. But in the right part, join every two lines (both non-blank and blank) into one line and substitute the \n with space. Then, if the number of consecutive blank lines in the original file is odd, that the last blank line will join the line number of next line.

For example:
aaa
blank
bbb

After the left part:
1
aaa
blank
3
bbb

So, I think the solution can be found in the left part
sed &#039;/./=&#039; thegeekstuff.txt &#124; sed &#039;/./{
N
s/\n/ /
}&#039;</description>
		<content:encoded><![CDATA[<p>In Example 2, I think the command provided in the article only works when the number of consecutive blank lines is even. Because in the left part, sed &#8216;/./=&#8217; only print the line number before the non-blank line, the blank line is not changed. But in the right part, join every two lines (both non-blank and blank) into one line and substitute the \n with space. Then, if the number of consecutive blank lines in the original file is odd, that the last blank line will join the line number of next line.</p>
<p>For example:<br />
aaa<br />
blank<br />
bbb</p>
<p>After the left part:<br />
1<br />
aaa<br />
blank<br />
3<br />
bbb</p>
<p>So, I think the solution can be found in the left part<br />
sed &#8216;/./=&#8217; thegeekstuff.txt | sed &#8216;/./{<br />
N<br />
s/\n/ /<br />
}&#8217;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
