<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>David Hrbáč &#187; sed</title>
	<atom:link href="http://www.hrbac.cz/category/sed/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hrbac.cz</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 17 Jan 2012 21:43:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Add line to the top of files with sed</title>
		<link>http://www.hrbac.cz/2011/10/add-line-to-the-top-of-files-with-sed/</link>
		<comments>http://www.hrbac.cz/2011/10/add-line-to-the-top-of-files-with-sed/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 15:20:21 +0000</pubDate>
		<dc:creator>David Hrbáč</dc:creator>
				<category><![CDATA[sed]]></category>

		<guid isPermaLink="false">http://www.hrbac.cz/?p=354</guid>
		<description><![CDATA[One-liner to add line at the beginning of the file(s). find mirrors-* -exec sed -i 1i'http://webmel53.vsb.cz/hrb33/el$releasever/hrb/stable/$basearch/' &#123;&#125; \;]]></description>
			<content:encoded><![CDATA[<p>One-liner to add line at the beginning of the file(s).</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">find</span> mirrors-<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-i</span> 1i<span style="color: #ff0000;">'http://webmel53.vsb.cz/hrb33/el$releasever/hrb/stable/$basearch/'</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.hrbac.cz/2011/10/add-line-to-the-top-of-files-with-sed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sed to correct path lines</title>
		<link>http://www.hrbac.cz/2010/02/sed-to-correct-path-lines/</link>
		<comments>http://www.hrbac.cz/2010/02/sed-to-correct-path-lines/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 12:22:56 +0000</pubDate>
		<dc:creator>David Hrbáč</dc:creator>
				<category><![CDATA[regular expressions]]></category>
		<category><![CDATA[sed]]></category>

		<guid isPermaLink="false">http://www.hrbac.cz/?p=196</guid>
		<description><![CDATA[Sed one-liner to change correct paths. Before: php_admin_value open_basedir /srv/www/www.domena.tld/www After: php_admin_value open_basedir /srv/www/www.domena.tld Sed script: sed -i &#34;s/\(.*\)php_admin_value open_basedir \(.*\)\/www$/\1php_admin_value open_basedir \2/g&#34; /etc/httpd/conf/httpd.conf]]></description>
			<content:encoded><![CDATA[<p>Sed one-liner to change correct paths. Before:</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">php_admin_value</span> open_basedir /srv/www/www.domena.tld/www</pre></div></div>

<p>After:</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">php_admin_value</span> open_basedir /srv/www/www.domena.tld</pre></div></div>

<p>Sed script:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-i</span> <span style="color: #ff0000;">&quot;s/\(.*\)php_admin_value open_basedir \(.*\)\/www$/\1php_admin_value open_basedir \2/g&quot;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>httpd.conf</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.hrbac.cz/2010/02/sed-to-correct-path-lines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

