<?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: Find and Replace Text Inside a File Using RegEx</title>
	<atom:link href="http://www.thegeekstuff.com/2009/09/unix-sed-tutorial-replace-text-inside-a-file-using-substitute-command/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thegeekstuff.com/2009/09/unix-sed-tutorial-replace-text-inside-a-file-using-substitute-command/</link>
	<description>Guides, HowTos and Tips for Technology Geeks</description>
	<lastBuildDate>Thu, 09 Feb 2012 13:04:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Ivan Neva</title>
		<link>http://www.thegeekstuff.com/2009/09/unix-sed-tutorial-replace-text-inside-a-file-using-substitute-command/comment-page-1/#comment-194183</link>
		<dc:creator>Ivan Neva</dc:creator>
		<pubDate>Wed, 08 Feb 2012 15:28:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=2135#comment-194183</guid>
		<description>Hi,

This is a very useful tutorial.  I&#039;m actually facing a problem with the pattern search, and haven&#039;t been able to figure it out.  I have a file I need to load to a database, and for that I need to insert a special character when I find the following sequence of characters: double quotes - end of line - double quotes (&quot;\n&quot;). I need to insert a @ symbol between the first double quotes and the end-of-line (&quot;@\n&quot;). The \n is of course the end-of-line character.  So far I&#039;m only been able to insert the character using: (&quot;$), sed &#039;s/\&quot;$/&amp;@/g&#039; filename, but sometimes I need to make sure the next line starts with the double quotes character (&quot;).  Is there any way to do it with SED pattern matching?  I have tried with different combinations, but without any luck.

Thanks in advance, great blog by the way.

Ivan Neva
Oracle DBA</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>This is a very useful tutorial.  I&#8217;m actually facing a problem with the pattern search, and haven&#8217;t been able to figure it out.  I have a file I need to load to a database, and for that I need to insert a special character when I find the following sequence of characters: double quotes &#8211; end of line &#8211; double quotes (&#8220;\n&#8221;). I need to insert a @ symbol between the first double quotes and the end-of-line (&#8220;@\n&#8221;). The \n is of course the end-of-line character.  So far I&#8217;m only been able to insert the character using: (&#8220;$), sed &#8216;s/\&#8221;$/&amp;@/g&#8217; filename, but sometimes I need to make sure the next line starts with the double quotes character (&#8220;).  Is there any way to do it with SED pattern matching?  I have tried with different combinations, but without any luck.</p>
<p>Thanks in advance, great blog by the way.</p>
<p>Ivan Neva<br />
Oracle DBA</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brad</title>
		<link>http://www.thegeekstuff.com/2009/09/unix-sed-tutorial-replace-text-inside-a-file-using-substitute-command/comment-page-1/#comment-135784</link>
		<dc:creator>Brad</dc:creator>
		<pubDate>Sat, 29 Oct 2011 09:15:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=2135#comment-135784</guid>
		<description>@Mui,

You need to direct the output to another file; otherwise it is written to standard output, i.e. the terminal screen.  Hence:

sed ‘s/Linux/Linux-Unix/’ thegeekstuff.txt &gt; new_file.txt

Also want to thank the blogger for this site and its edifying content.</description>
		<content:encoded><![CDATA[<p>@Mui,</p>
<p>You need to direct the output to another file; otherwise it is written to standard output, i.e. the terminal screen.  Hence:</p>
<p>sed ‘s/Linux/Linux-Unix/’ thegeekstuff.txt &gt; new_file.txt</p>
<p>Also want to thank the blogger for this site and its edifying content.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mui</title>
		<link>http://www.thegeekstuff.com/2009/09/unix-sed-tutorial-replace-text-inside-a-file-using-substitute-command/comment-page-1/#comment-114849</link>
		<dc:creator>Mui</dc:creator>
		<pubDate>Mon, 27 Jun 2011 01:31:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=2135#comment-114849</guid>
		<description>Hi, 

After i type in the command, eg sed &#039;s/Linux/Linux-Unix/&#039; thegeekstuff.txt , 

I type vi thegeekstuff.txt , it appears that the old file remains. Thus, do i still need to type in anything to save the changes in thegeekstuff.txt ?? 

Thanks in advance.</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>After i type in the command, eg sed &#8216;s/Linux/Linux-Unix/&#8217; thegeekstuff.txt , </p>
<p>I type vi thegeekstuff.txt , it appears that the old file remains. Thus, do i still need to type in anything to save the changes in thegeekstuff.txt ?? </p>
<p>Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rishi</title>
		<link>http://www.thegeekstuff.com/2009/09/unix-sed-tutorial-replace-text-inside-a-file-using-substitute-command/comment-page-1/#comment-81100</link>
		<dc:creator>rishi</dc:creator>
		<pubDate>Tue, 25 Jan 2011 07:45:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=2135#comment-81100</guid>
		<description>Hi,
I am trying to write a script.
In /var/log/messages i have to delete lines older than 5days when compared to the present date. Could you people help me out in this script.
Thanks</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I am trying to write a script.<br />
In /var/log/messages i have to delete lines older than 5days when compared to the present date. Could you people help me out in this script.<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Piyush</title>
		<link>http://www.thegeekstuff.com/2009/09/unix-sed-tutorial-replace-text-inside-a-file-using-substitute-command/comment-page-1/#comment-79796</link>
		<dc:creator>Piyush</dc:creator>
		<pubDate>Tue, 18 Jan 2011 09:01:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=2135#comment-79796</guid>
		<description>Hi,

Can i use two or more find and replace at a time using sed.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Can i use two or more find and replace at a time using sed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Srinivas</title>
		<link>http://www.thegeekstuff.com/2009/09/unix-sed-tutorial-replace-text-inside-a-file-using-substitute-command/comment-page-1/#comment-75629</link>
		<dc:creator>Srinivas</dc:creator>
		<pubDate>Mon, 27 Dec 2010 19:35:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=2135#comment-75629</guid>
		<description>Excellent! Followed all articles, all are well presented.</description>
		<content:encoded><![CDATA[<p>Excellent! Followed all articles, all are well presented.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jimi</title>
		<link>http://www.thegeekstuff.com/2009/09/unix-sed-tutorial-replace-text-inside-a-file-using-substitute-command/comment-page-1/#comment-18965</link>
		<dc:creator>Jimi</dc:creator>
		<pubDate>Thu, 08 Oct 2009 19:48:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=2135#comment-18965</guid>
		<description>I did some googling on Example 10, and found this solution, which seems to work:

sed -n &#039;/^$/!{s/]*&gt;//g;p;}&#039; 

It&#039;s from this site: 

http://www.unix.com/linux/45584-how-remove-only-html-tags-inside-file.html</description>
		<content:encoded><![CDATA[<p>I did some googling on Example 10, and found this solution, which seems to work:</p>
<p>sed -n &#8216;/^$/!{s/]*&gt;//g;p;}&#8217; </p>
<p>It&#8217;s from this site: </p>
<p><a href="http://www.unix.com/linux/45584-how-remove-only-html-tags-inside-file.html" rel="nofollow">http://www.unix.com/linux/45584-how-remove-only-html-tags-inside-file.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcus Rhodes</title>
		<link>http://www.thegeekstuff.com/2009/09/unix-sed-tutorial-replace-text-inside-a-file-using-substitute-command/comment-page-1/#comment-18407</link>
		<dc:creator>Marcus Rhodes</dc:creator>
		<pubDate>Fri, 02 Oct 2009 19:31:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=2135#comment-18407</guid>
		<description>Hmmm... works on Ubuntu, though the filenames need padding, but has no effect on AIX.</description>
		<content:encoded><![CDATA[<p>Hmmm&#8230; works on Ubuntu, though the filenames need padding, but has no effect on AIX.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramesh Natarajan</title>
		<link>http://www.thegeekstuff.com/2009/09/unix-sed-tutorial-replace-text-inside-a-file-using-substitute-command/comment-page-1/#comment-18394</link>
		<dc:creator>Ramesh Natarajan</dc:creator>
		<pubDate>Fri, 02 Oct 2009 16:19:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=2135#comment-18394</guid>
		<description>@Paul,

Print Friendly option is implemented. You&#039;ll see this at the bottom of all articles. Thanks.</description>
		<content:encoded><![CDATA[<p>@Paul,</p>
<p>Print Friendly option is implemented. You&#8217;ll see this at the bottom of all articles. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Destillat KW40-2009 &#124; duetsch.info - GNU/Linux, Open Source, Softwareentwicklung, Selbstmanagement, Vim ...</title>
		<link>http://www.thegeekstuff.com/2009/09/unix-sed-tutorial-replace-text-inside-a-file-using-substitute-command/comment-page-1/#comment-18366</link>
		<dc:creator>Destillat KW40-2009 &#124; duetsch.info - GNU/Linux, Open Source, Softwareentwicklung, Selbstmanagement, Vim ...</dc:creator>
		<pubDate>Fri, 02 Oct 2009 10:54:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=2135#comment-18366</guid>
		<description>[...] Unix Sed Tutorial: Find and Replace Text Inside a File Using RegEx [...]</description>
		<content:encoded><![CDATA[<p>[...] Unix Sed Tutorial: Find and Replace Text Inside a File Using RegEx [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Content Delivery Network via Amazon Web Services: CloudFront: static.thegeekstuff.com

Served from: www.thegeekstuff.com @ 2012-02-09 15:55:12 -->
