<?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: How to pretty-print my.cnf with a one-liner</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2009/06/15/how-to-pretty-print-mycnf-with-a-one-liner/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2009/06/15/how-to-pretty-print-mycnf-with-a-one-liner/</link>
	<description>Everything about MySQL Performance</description>
	<lastBuildDate>Sat, 21 Nov 2009 05:23:57 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Seth</title>
		<link>http://www.mysqlperformanceblog.com/2009/06/15/how-to-pretty-print-mycnf-with-a-one-liner/comment-page-1/#comment-593982</link>
		<dc:creator>Seth</dc:creator>
		<pubDate>Wed, 24 Jun 2009 00:53:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=702#comment-593982</guid>
		<description>Thanks, I got it working now.  I don&#039;t think I was including the filename before.</description>
		<content:encoded><![CDATA[<p>Thanks, I got it working now.  I don&#8217;t think I was including the filename before.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jacob Sohn</title>
		<link>http://www.mysqlperformanceblog.com/2009/06/15/how-to-pretty-print-mycnf-with-a-one-liner/comment-page-1/#comment-593904</link>
		<dc:creator>Jacob Sohn</dc:creator>
		<pubDate>Tue, 23 Jun 2009 23:39:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=702#comment-593904</guid>
		<description>@Seth

have you tried &quot;printmycnf /etc/my.cnf&quot; after alias command?

On my system;
$ alias printmycnf=’awk -F= “! /(^#&#124;^$)/ { if (\$2 != \”\”) printf \”%-34s = %s\n\”, \$1,\$2; else printf \”%s\n\”, \$1 }”‘
$ printmycnf /etc/my.cnf

works like a charm.

ps: don&#039;t forget to replace single quote and double quote.  better yet, just type it in manually.</description>
		<content:encoded><![CDATA[<p>@Seth</p>
<p>have you tried &#8220;printmycnf /etc/my.cnf&#8221; after alias command?</p>
<p>On my system;<br />
$ alias printmycnf=’awk -F= “! /(^#|^$)/ { if (\$2 != \”\”) printf \”%-34s = %s\n\”, \$1,\$2; else printf \”%s\n\”, \$1 }”‘<br />
$ printmycnf /etc/my.cnf</p>
<p>works like a charm.</p>
<p>ps: don&#8217;t forget to replace single quote and double quote.  better yet, just type it in manually.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seth</title>
		<link>http://www.mysqlperformanceblog.com/2009/06/15/how-to-pretty-print-mycnf-with-a-one-liner/comment-page-1/#comment-588654</link>
		<dc:creator>Seth</dc:creator>
		<pubDate>Thu, 18 Jun 2009 07:30:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=702#comment-588654</guid>
		<description>I tried that, but it just hung.</description>
		<content:encoded><![CDATA[<p>I tried that, but it just hung.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jacob Sohn</title>
		<link>http://www.mysqlperformanceblog.com/2009/06/15/how-to-pretty-print-mycnf-with-a-one-liner/comment-page-1/#comment-588556</link>
		<dc:creator>Jacob Sohn</dc:creator>
		<pubDate>Thu, 18 Jun 2009 04:43:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=702#comment-588556</guid>
		<description>@Seth

Yeah, the &quot;,&#039;,` characters gets altered from ISO-8859-1 to UTF-8 probably.  Copy and paste the code and just replace those characters with proper ones.  Then all should work fine.

-jacob</description>
		<content:encoded><![CDATA[<p>@Seth</p>
<p>Yeah, the &#8220;,&#8217;,` characters gets altered from ISO-8859-1 to UTF-8 probably.  Copy and paste the code and just replace those characters with proper ones.  Then all should work fine.</p>
<p>-jacob</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seth</title>
		<link>http://www.mysqlperformanceblog.com/2009/06/15/how-to-pretty-print-mycnf-with-a-one-liner/comment-page-1/#comment-588487</link>
		<dc:creator>Seth</dc:creator>
		<pubDate>Thu, 18 Jun 2009 03:28:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=702#comment-588487</guid>
		<description>Appears that WordPress is messing up the quotes for us, as my post is exhibiting the same quoting issue.</description>
		<content:encoded><![CDATA[<p>Appears that WordPress is messing up the quotes for us, as my post is exhibiting the same quoting issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seth</title>
		<link>http://www.mysqlperformanceblog.com/2009/06/15/how-to-pretty-print-mycnf-with-a-one-liner/comment-page-1/#comment-588485</link>
		<dc:creator>Seth</dc:creator>
		<pubDate>Thu, 18 Jun 2009 03:27:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=702#comment-588485</guid>
		<description>@Jacob - Not sure what&#039;s going on here... but the quoting is messed up.  Appears to be the MS-SmartQuotes / unicode issue.  Some of the double-quotes above are leaning one direction and some are leaning the other way.  When I paste it as is into my terminal I get:

 alias printmycnf=.awk -F= .! /(^#&#124;^$)/ { if (\$2 != \.\.) printf \.%-34s = %s\n\., \$1,\$2; else printf \.%s\n\., \$1 }..

Did you copy and paste from somewhere weird, like a word document or something?  I tried to modify it back to what it should be:

 alias printmycnf=&#039;awk -F= &quot;! /(^#&#124;^$)/ { if (\$2 != \&quot;\&quot;) printf \&quot;%-34s = %s\n\&quot;, \$1,\$2; else printf \&quot;%s\n\&quot;, \$1 }&quot;&#039;

But when I ran it (RHEL 4.8) it just hung.  I&#039;ve tried inserting the perl string as an alias and doing various things to escape the quotes w/l much luck.

I guess I could just put the command into a shell script for now.</description>
		<content:encoded><![CDATA[<p>@Jacob &#8211; Not sure what&#8217;s going on here&#8230; but the quoting is messed up.  Appears to be the MS-SmartQuotes / unicode issue.  Some of the double-quotes above are leaning one direction and some are leaning the other way.  When I paste it as is into my terminal I get:</p>
<p> alias printmycnf=.awk -F= .! /(^#|^$)/ { if (\$2 != \.\.) printf \.%-34s = %s\n\., \$1,\$2; else printf \.%s\n\., \$1 }..</p>
<p>Did you copy and paste from somewhere weird, like a word document or something?  I tried to modify it back to what it should be:</p>
<p> alias printmycnf=&#8217;awk -F= &#8220;! /(^#|^$)/ { if (\$2 != \&#8221;\&#8221;) printf \&#8221;%-34s = %s\n\&#8221;, \$1,\$2; else printf \&#8221;%s\n\&#8221;, \$1 }&#8221;&#8216;</p>
<p>But when I ran it (RHEL 4.8) it just hung.  I&#8217;ve tried inserting the perl string as an alias and doing various things to escape the quotes w/l much luck.</p>
<p>I guess I could just put the command into a shell script for now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jacob Sohn</title>
		<link>http://www.mysqlperformanceblog.com/2009/06/15/how-to-pretty-print-mycnf-with-a-one-liner/comment-page-1/#comment-588479</link>
		<dc:creator>Jacob Sohn</dc:creator>
		<pubDate>Thu, 18 Jun 2009 03:13:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=702#comment-588479</guid>
		<description>@Seth
knowning where to escape, you should be able to do as this;

alias printmycnf=&#039;awk -F= &quot;! /(^#&#124;^$)/ { if (\$2 != \&quot;\&quot;) printf \&quot;%-34s = %s\n\&quot;, \$1,\$2; else printf \&quot;%s\n\&quot;, \$1 }&quot;&#039;

you can replace with perl one-liner where awk is.

-jacob</description>
		<content:encoded><![CDATA[<p>@Seth<br />
knowning where to escape, you should be able to do as this;</p>
<p>alias printmycnf=&#8217;awk -F= &#8220;! /(^#|^$)/ { if (\$2 != \&#8221;\&#8221;) printf \&#8221;%-34s = %s\n\&#8221;, \$1,\$2; else printf \&#8221;%s\n\&#8221;, \$1 }&#8221;&#8216;</p>
<p>you can replace with perl one-liner where awk is.</p>
<p>-jacob</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seth</title>
		<link>http://www.mysqlperformanceblog.com/2009/06/15/how-to-pretty-print-mycnf-with-a-one-liner/comment-page-1/#comment-588138</link>
		<dc:creator>Seth</dc:creator>
		<pubDate>Wed, 17 Jun 2009 17:12:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=702#comment-588138</guid>
		<description>Should have said:

alias printmycnf=[insert perl one-liner]</description>
		<content:encoded><![CDATA[<p>Should have said:</p>
<p>alias printmycnf=[insert perl one-liner]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seth</title>
		<link>http://www.mysqlperformanceblog.com/2009/06/15/how-to-pretty-print-mycnf-with-a-one-liner/comment-page-1/#comment-588137</link>
		<dc:creator>Seth</dc:creator>
		<pubDate>Wed, 17 Jun 2009 17:11:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=702#comment-588137</guid>
		<description>Any hints on how to get this to work as a bash alias?

I would like to add something like this to my .bashrc:

  alias printmycnf=

but no amount of quote hacking is getting it to work.  

Or has someone refactored it has a perl script?  I think I could do that, but my first attempt was taking longer than 5 minutes so I thought I would ask.

Thanks</description>
		<content:encoded><![CDATA[<p>Any hints on how to get this to work as a bash alias?</p>
<p>I would like to add something like this to my .bashrc:</p>
<p>  alias printmycnf=</p>
<p>but no amount of quote hacking is getting it to work.  </p>
<p>Or has someone refactored it has a perl script?  I think I could do that, but my first attempt was taking longer than 5 minutes so I thought I would ask.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: julien antony</title>
		<link>http://www.mysqlperformanceblog.com/2009/06/15/how-to-pretty-print-mycnf-with-a-one-liner/comment-page-1/#comment-586836</link>
		<dc:creator>julien antony</dc:creator>
		<pubDate>Tue, 16 Jun 2009 07:13:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=702#comment-586836</guid>
		<description>for pretty output with colors, you can use this python script: http://www.linibou.com/colorex/ also useful for logs.</description>
		<content:encoded><![CDATA[<p>for pretty output with colors, you can use this python script: <a href="http://www.linibou.com/colorex/" rel="nofollow">http://www.linibou.com/colorex/</a> also useful for logs.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
