<?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: How To Execute Multiple Sed Commands</title>
	<atom:link href="http://www.thegeekstuff.com/2009/10/unix-sed-tutorial-how-to-execute-multiple-sed-commands/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thegeekstuff.com/2009/10/unix-sed-tutorial-how-to-execute-multiple-sed-commands/</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: frankhuang</title>
		<link>http://www.thegeekstuff.com/2009/10/unix-sed-tutorial-how-to-execute-multiple-sed-commands/comment-page-1/#comment-70057</link>
		<dc:creator>frankhuang</dc:creator>
		<pubDate>Wed, 17 Nov 2010 07:10:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=2306#comment-70057</guid>
		<description>The command 
sed &#039;1~50s/a/x/g&#039; filename.txt &gt;out.txt
also works</description>
		<content:encoded><![CDATA[<p>The command<br />
sed &#8217;1~50s/a/x/g&#8217; filename.txt &gt;out.txt<br />
also works</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sasikala</title>
		<link>http://www.thegeekstuff.com/2009/10/unix-sed-tutorial-how-to-execute-multiple-sed-commands/comment-page-1/#comment-30371</link>
		<dc:creator>Sasikala</dc:creator>
		<pubDate>Thu, 21 Jan 2010 05:16:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=2306#comment-30371</guid>
		<description>To change &quot;a&quot; by &quot;x&quot; in every 50th line of a file, use the following. 

$ sed &#039;
:loop
$!N
s/^\(\([^\n]*\n\)\{49\}\)a\([^\n]*\)/\1x\3/
t
$!b loop
&#039; filename</description>
		<content:encoded><![CDATA[<p>To change &#8220;a&#8221; by &#8220;x&#8221; in every 50th line of a file, use the following. </p>
<p>$ sed &#8216;<br />
:loop<br />
$!N<br />
s/^\(\([^\n]*\n\)\{49\}\)a\([^\n]*\)/\1x\3/<br />
t<br />
$!b loop<br />
&#8216; filename</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Alles</title>
		<link>http://www.thegeekstuff.com/2009/10/unix-sed-tutorial-how-to-execute-multiple-sed-commands/comment-page-1/#comment-30317</link>
		<dc:creator>John Alles</dc:creator>
		<pubDate>Wed, 20 Jan 2010 15:18:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=2306#comment-30317</guid>
		<description>Hi,
I have a file as 12000 lines like this:
a 1 2 3
a 2 3 4 
a 5 6 9
.....
I would like to change &quot;a&quot; by &quot;x&quot; every 50 lines.

I know   this command:
sed -e &quot;s///&quot;

I have to 2400 times.
 Do you know easier way for taht?</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I have a file as 12000 lines like this:<br />
a 1 2 3<br />
a 2 3 4<br />
a 5 6 9<br />
&#8230;..<br />
I would like to change &#8220;a&#8221; by &#8220;x&#8221; every 50 lines.</p>
<p>I know   this command:<br />
sed -e &#8220;s///&#8221;</p>
<p>I have to 2400 times.<br />
 Do you know easier way for taht?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fety</title>
		<link>http://www.thegeekstuff.com/2009/10/unix-sed-tutorial-how-to-execute-multiple-sed-commands/comment-page-1/#comment-22138</link>
		<dc:creator>fety</dc:creator>
		<pubDate>Thu, 12 Nov 2009 09:14:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=2306#comment-22138</guid>
		<description>Hi, Ramesh

I have been following your tutorial from the first tutorial of SED. It is really help me so much to understand better about SED.
Again, thanks very much.</description>
		<content:encoded><![CDATA[<p>Hi, Ramesh</p>
<p>I have been following your tutorial from the first tutorial of SED. It is really help me so much to understand better about SED.<br />
Again, thanks very much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Destillat KW43-2009 &#124; duetsch.info - GNU/Linux, Open Source, Softwareentwicklung, Selbstmanagement, Vim ...</title>
		<link>http://www.thegeekstuff.com/2009/10/unix-sed-tutorial-how-to-execute-multiple-sed-commands/comment-page-1/#comment-20201</link>
		<dc:creator>Destillat KW43-2009 &#124; duetsch.info - GNU/Linux, Open Source, Softwareentwicklung, Selbstmanagement, Vim ...</dc:creator>
		<pubDate>Fri, 23 Oct 2009 09:05:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=2306#comment-20201</guid>
		<description>[...] Unix Sed Tutorial: How To Execute Multiple Sed Commands [...]</description>
		<content:encoded><![CDATA[<p>[...] Unix Sed Tutorial: How To Execute Multiple Sed Commands [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guy Patterson</title>
		<link>http://www.thegeekstuff.com/2009/10/unix-sed-tutorial-how-to-execute-multiple-sed-commands/comment-page-1/#comment-20183</link>
		<dc:creator>Guy Patterson</dc:creator>
		<pubDate>Fri, 23 Oct 2009 02:43:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=2306#comment-20183</guid>
		<description>There&#039;s also potential to use a semi-colon to combine multiple sed arguments. 

For example, I use the following to watch httpd access logs:

RED=`echo -en &#039;\e[32m&#039;`
YELLOW=`echo -en &#039;\e[93m&#039;`
RESET=`echo -en &#039;\e[00m&#039;

sudo tail -f /mnt/netdata/_shares/logs/httpd/domain.com/$YEAR/$MON/domain-access-$MON-$YEAR.log &#124;sed -e &quot;s/^.*\]: //g;s/ www.domain.*\] \&quot;/ - \&quot;/g;s/ HTTP\/1\.[0-9]\&quot;/\&quot;/g;s/ [0-9][0-9][0-9] [0-9]* \&quot;/ \&quot;/g;s/http:\/\/www.domain.com//g;s/\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\)/$RED\1$RESET/g;s/\(\&quot;[^\&quot;]*\&quot;\)/$YELLOW\1$RESET/g;s/*169.254.254.254*//g&quot;

yay cli! :]</description>
		<content:encoded><![CDATA[<p>There&#8217;s also potential to use a semi-colon to combine multiple sed arguments. </p>
<p>For example, I use the following to watch httpd access logs:</p>
<p>RED=`echo -en &#8216;\e[32m'`<br />
YELLOW=`echo -en '\e[93m'`<br />
RESET=`echo -en '\e[00m'</p>
<p>sudo tail -f /mnt/netdata/_shares/logs/httpd/domain.com/$YEAR/$MON/domain-access-$MON-$YEAR.log |sed -e "s/^.*\]: //g;s/ <a href="http://www.domain" rel="nofollow">http://www.domain</a>.*\] \&#8221;/ &#8211; \&#8221;/g;s/ HTTP\/1\.[0-9]\&#8221;/\&#8221;/g;s/ [0-9][0-9][0-9] [0-9]* \&#8221;/ \&#8221;/g;s/http:\/\/www.domain.com//g;s/\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\)/$RED\1$RESET/g;s/\(\&#8221;[^\"]*\&#8221;\)/$YELLOW\1$RESET/g;s/*169.254.254.254*//g&#8221;</p>
<p>yay cli! :]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seraphyn Blog</title>
		<link>http://www.thegeekstuff.com/2009/10/unix-sed-tutorial-how-to-execute-multiple-sed-commands/comment-page-1/#comment-19608</link>
		<dc:creator>Seraphyn Blog</dc:creator>
		<pubDate>Fri, 16 Oct 2009 09:25:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=2306#comment-19608</guid>
		<description>&lt;strong&gt;Links 161009...&lt;/strong&gt;

Deep Packet Inspection Engine Goes Open SourceDeep packet inspection (DPI) hardware can identify an astonishing array of protocols passing across the Internet—up to and including protocols that are rare even to us in the Orbiting HQ (Gadu-Gadu? Manolit...</description>
		<content:encoded><![CDATA[<p><strong>Links 161009&#8230;</strong></p>
<p>Deep Packet Inspection Engine Goes Open SourceDeep packet inspection (DPI) hardware can identify an astonishing array of protocols passing across the Internet—up to and including protocols that are rare even to us in the Orbiting HQ (Gadu-Gadu? Manolit&#8230;</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 13:37:50 -->
