<?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>Croc-Informatique.fr &#187; grep</title>
	<atom:link href="http://www.croc-informatique.fr/tag/grep/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.croc-informatique.fr</link>
	<description>Le Blog Note d'Olivier Legras</description>
	<lastBuildDate>Wed, 18 Jan 2012 16:29:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Afficher un fichier de configuration sans les commentaires</title>
		<link>http://www.croc-informatique.fr/2009/12/afficher-un-fichier-de-configuration-sans-les-commentaires/</link>
		<comments>http://www.croc-informatique.fr/2009/12/afficher-un-fichier-de-configuration-sans-les-commentaires/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 13:15:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Astuces]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[conf]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[fichier]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[sed]]></category>

		<guid isPermaLink="false">http://www.croc-informatique.fr/2009/12/afficher-un-fichier-de-configuration-sans-les-commentaires/</guid>
		<description><![CDATA[Pour y voir plus claire, il est parfois nécessaire de voir seulement ce qui est activé dans les fichiers de configuration. Pour cela, je vous propose plusieurs commandes : Grep : grep -E -v &#8216;^(#&#124;$)&#8217; /etc/httpd/conf/httpd.conf egrep -v &#8216;^(#&#124;$)&#8217;&#160; /etc/httpd/conf/httpd.conf &#160; On peut ajouter des délimiteurs de cette manière : grep -E -v '^(#&#124;;&#124;$&#124;[ ]*#)' [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Pour y voir plus claire, il est parfois nécessaire de voir seulement ce qui est activé dans les fichiers de configuration. Pour cela, je vous propose plusieurs commandes :</p>
<p>Grep :</p>
<blockquote><p>grep -E -v &#8216;^(#|$)&#8217; /etc/httpd/conf/httpd.conf</p>
<p>egrep -v &#8216;^(#|$)&#8217;&#160; /etc/httpd/conf/httpd.conf</p>
</blockquote>
<p>&#160;</p>
<p>On peut ajouter des délimiteurs de cette manière :</p>
<blockquote><pre>grep -E -v '^(#|;|$|[ ]*#)' /etc/httpd/conf/httpd.conf</pre>
<p><span id="more-469"></span></p>
</blockquote>
<p>&#160;</p>
<p>Sed :</p>
<blockquote>
<pre>sed -e '/^[ ]*#/d' -e '/^$/d' /etc/httpd/conf/httpd.conf</pre>
</blockquote>
<p>On peut ajouter des délimiteurs :</p>
<blockquote>
<pre>sed -e '/^[ ]*#/d' -e '/^[ ]*;/d' -e '/^$/d' /etc/httpd/conf/httpd.conf</pre>
</blockquote>
<p>Perl :</p>
<blockquote>
<pre>perl -ne 'print unless /^\s*[;\$#]|^$/' /etc/httpd/conf/httpd.conf</pre>
</blockquote>
<div class="shr-publisher-469"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.croc-informatique.fr%2F2009%2F12%2Fafficher-un-fichier-de-configuration-sans-les-commentaires%2F' data-shr_title='Afficher+un+fichier+de+configuration+sans+les+commentaires'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='false' data-shr_href='http%3A%2F%2Fwww.croc-informatique.fr%2F2009%2F12%2Fafficher-un-fichier-de-configuration-sans-les-commentaires%2F' data-shr_title='Afficher+un+fichier+de+configuration+sans+les+commentaires'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.croc-informatique.fr/2009/12/afficher-un-fichier-de-configuration-sans-les-commentaires/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

