<?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"
	>
<channel>
	<title>Comments on: BASH: Single-quotes inside of single-quoted strings</title>
	<atom:link href="http://muffinresearch.co.uk/archives/2007/01/30/bash-single-quotes-inside-of-single-quoted-strings/feed/" rel="self" type="application/rss+xml" />
	<link>http://muffinresearch.co.uk/archives/2007/01/30/bash-single-quotes-inside-of-single-quoted-strings/</link>
	<description>the personal blog of Stuart Colville covering modern web development techniques and best practices</description>
	<pubDate>Fri, 29 Aug 2008 08:07:02 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Matt</title>
		<link>http://muffinresearch.co.uk/archives/2007/01/30/bash-single-quotes-inside-of-single-quoted-strings/#comment-64552</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Mon, 18 Aug 2008 16:20:02 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2007/01/30/bash-single-quotes-inside-of-single-quoted-strings/#comment-64552</guid>
		<description>So if you have a string that you're cleaning up, say in python:

str.replace("'","'\\''")

first ' - end single quoted string
\\ - literal backslash
' - single quote to be backslashed
' - resume single quoted string

Thanks!</description>
		<content:encoded><![CDATA[<p>So if you have a string that you&#8217;re cleaning up, say in python:</p>
<p>str.replace(&#8221;&#8216;&#8221;,&#8221;&#8216;\\&#8221;&#8221;)</p>
<p>first &#8216; - end single quoted string<br />
\\ - literal backslash<br />
&#8216; - single quote to be backslashed<br />
&#8216; - resume single quoted string</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arif</title>
		<link>http://muffinresearch.co.uk/archives/2007/01/30/bash-single-quotes-inside-of-single-quoted-strings/#comment-64516</link>
		<dc:creator>Arif</dc:creator>
		<pubDate>Thu, 31 Jul 2008 09:25:02 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2007/01/30/bash-single-quotes-inside-of-single-quoted-strings/#comment-64516</guid>
		<description>Worked perfectly! Digging it!</description>
		<content:encoded><![CDATA[<p>Worked perfectly! Digging it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Isaac</title>
		<link>http://muffinresearch.co.uk/archives/2007/01/30/bash-single-quotes-inside-of-single-quoted-strings/#comment-63849</link>
		<dc:creator>Isaac</dc:creator>
		<pubDate>Sun, 06 Jan 2008 15:48:10 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2007/01/30/bash-single-quotes-inside-of-single-quoted-strings/#comment-63849</guid>
		<description>Bingo! It works! Thanks.
I needed it to use awk inside an alias.</description>
		<content:encoded><![CDATA[<p>Bingo! It works! Thanks.<br />
I needed it to use awk inside an alias.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Poor Yorick</title>
		<link>http://muffinresearch.co.uk/archives/2007/01/30/bash-single-quotes-inside-of-single-quoted-strings/#comment-63320</link>
		<dc:creator>Poor Yorick</dc:creator>
		<pubDate>Tue, 09 Oct 2007 15:44:25 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2007/01/30/bash-single-quotes-inside-of-single-quoted-strings/#comment-63320</guid>
		<description>It is documented in my version of the man page, dated 2002 July 15, in the section called QUOTING:

Words of the form &lt;code&gt;$'string'&lt;/code&gt; are treated specially...

&lt;code&gt;\'&lt;/code&gt;     single quote</description>
		<content:encoded><![CDATA[<p>It is documented in my version of the man page, dated 2002 July 15, in the section called QUOTING:</p>
<p>Words of the form <code>$'string'</code> are treated specially&#8230;</p>
<p><code>\'</code>     single quote</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam Morris</title>
		<link>http://muffinresearch.co.uk/archives/2007/01/30/bash-single-quotes-inside-of-single-quoted-strings/#comment-38080</link>
		<dc:creator>Sam Morris</dc:creator>
		<pubDate>Wed, 16 May 2007 20:14:54 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2007/01/30/bash-single-quotes-inside-of-single-quoted-strings/#comment-38080</guid>
		<description>You can also use ANSI C style quoting. This is not documented in bash's man page, annoyingly.

&lt;code&gt;$ echo $'foo\'bar'&lt;/code&gt;
&lt;code&gt;foo'bar&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>You can also use ANSI C style quoting. This is not documented in bash&#8217;s man page, annoyingly.</p>
<p><code>$ echo $'foo\'bar'</code><br />
<code>foo'bar</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://muffinresearch.co.uk/archives/2007/01/30/bash-single-quotes-inside-of-single-quoted-strings/#comment-33455</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Thu, 22 Mar 2007 20:38:40 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2007/01/30/bash-single-quotes-inside-of-single-quoted-strings/#comment-33455</guid>
		<description>Thanks for the tip! It worked pefectly!</description>
		<content:encoded><![CDATA[<p>Thanks for the tip! It worked pefectly!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
