<?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: Tip: Running command line / shell commands in Ruby using %x</title>
	<atom:link href="http://www.gotripod.com/2007/10/07/tip-running-command-line-shell-commands-in-ruby-using-x/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gotripod.com/2007/10/07/tip-running-command-line-shell-commands-in-ruby-using-x/</link>
	<description>We design &#38; build outstanding websites, desktop and mobile software applications</description>
	<lastBuildDate>Tue, 08 Nov 2011 22:37:47 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Tony Mann</title>
		<link>http://www.gotripod.com/2007/10/07/tip-running-command-line-shell-commands-in-ruby-using-x/comment-page-1/#comment-12273</link>
		<dc:creator>Tony Mann</dc:creator>
		<pubDate>Thu, 09 Dec 2010 02:01:30 +0000</pubDate>
		<guid isPermaLink="false">http://old.miletbaker.com/index.php/2007/10/18/tip-running-command-line-shell-commands-in-ruby-using-x/#comment-12273</guid>
		<description>Example #2 is not right. It should be:

@whois = %x[whois #{dom}]

That is, no backslashes. If you backslash, then you are asking the shell to do the interpolation instead of Ruby.</description>
		<content:encoded><![CDATA[<p>Example #2 is not right. It should be:</p>
<p>@whois = %x[whois #{dom}]</p>
<p>That is, no backslashes. If you backslash, then you are asking the shell to do the interpolation instead of Ruby.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: margaret</title>
		<link>http://www.gotripod.com/2007/10/07/tip-running-command-line-shell-commands-in-ruby-using-x/comment-page-1/#comment-205</link>
		<dc:creator>margaret</dc:creator>
		<pubDate>Thu, 10 Jul 2008 16:58:03 +0000</pubDate>
		<guid isPermaLink="false">http://old.miletbaker.com/index.php/2007/10/18/tip-running-command-line-shell-commands-in-ruby-using-x/#comment-205</guid>
		<description>I prove the three options but i&#039;m get the follow error:  Errno::ECONNREFUSED in ... What i am doing bad?? i prove exec command too and the server shut down after execute the command.

Tanks</description>
		<content:encoded><![CDATA[<p>I prove the three options but i&#8217;m get the follow error:  Errno::ECONNREFUSED in &#8230; What i am doing bad?? i prove exec command too and the server shut down after execute the command.</p>
<p>Tanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gaw.in</title>
		<link>http://www.gotripod.com/2007/10/07/tip-running-command-line-shell-commands-in-ruby-using-x/comment-page-1/#comment-201</link>
		<dc:creator>gaw.in</dc:creator>
		<pubDate>Thu, 05 Jun 2008 08:41:25 +0000</pubDate>
		<guid isPermaLink="false">http://old.miletbaker.com/index.php/2007/10/18/tip-running-command-line-shell-commands-in-ruby-using-x/#comment-201</guid>
		<description># Steve: you could start a thread and retrieve the result later.

dom = &#039;clockobj.co.uk&#039;
t = Thread.new { `whois #{dom}` }
puts &quot;Proceed with your code...&quot;
puts t.value</description>
		<content:encoded><![CDATA[<p># Steve: you could start a thread and retrieve the result later.</p>
<p>dom = &#8216;clockobj.co.uk&#8217;<br />
t = Thread.new { `whois #{dom}` }<br />
puts &#8220;Proceed with your code&#8230;&#8221;<br />
puts t.value</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve</title>
		<link>http://www.gotripod.com/2007/10/07/tip-running-command-line-shell-commands-in-ruby-using-x/comment-page-1/#comment-197</link>
		<dc:creator>steve</dc:creator>
		<pubDate>Tue, 25 Dec 2007 15:54:49 +0000</pubDate>
		<guid isPermaLink="false">http://old.miletbaker.com/index.php/2007/10/18/tip-running-command-line-shell-commands-in-ruby-using-x/#comment-197</guid>
		<description>I&#039;m kind of a newbe, but do these operations wait for the command line/shell command to complete, ie as if you were calling the function from a shell or command line and the whois operation was complete, to return to the ruby app and execute the next line of code?  Maybe this is obvious, but I haven&#039;t seen said details specified.  Thanks either way for the %x[], very helpfull</description>
		<content:encoded><![CDATA[<p>I&#8217;m kind of a newbe, but do these operations wait for the command line/shell command to complete, ie as if you were calling the function from a shell or command line and the whois operation was complete, to return to the ruby app and execute the next line of code?  Maybe this is obvious, but I haven&#8217;t seen said details specified.  Thanks either way for the %x[], very helpfull</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon</title>
		<link>http://www.gotripod.com/2007/10/07/tip-running-command-line-shell-commands-in-ruby-using-x/comment-page-1/#comment-193</link>
		<dc:creator>Jon</dc:creator>
		<pubDate>Thu, 01 Nov 2007 14:53:38 +0000</pubDate>
		<guid isPermaLink="false">http://old.miletbaker.com/index.php/2007/10/18/tip-running-command-line-shell-commands-in-ruby-using-x/#comment-193</guid>
		<description>Thanks for the comment, indeed this also works in exactly the same way. Interesting enough the syntax highlighting in RadRails doesn&#039;t like %x[] so if you are using this, you may prefer the back tick approach i.e.    @whois = `whois #{dom}`</description>
		<content:encoded><![CDATA[<p>Thanks for the comment, indeed this also works in exactly the same way. Interesting enough the syntax highlighting in RadRails doesn&#8217;t like %x[] so if you are using this, you may prefer the back tick approach i.e.    @whois = `whois #{dom}`</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ikai</title>
		<link>http://www.gotripod.com/2007/10/07/tip-running-command-line-shell-commands-in-ruby-using-x/comment-page-1/#comment-189</link>
		<dc:creator>Ikai</dc:creator>
		<pubDate>Thu, 01 Nov 2007 14:52:54 +0000</pubDate>
		<guid isPermaLink="false">http://old.miletbaker.com/index.php/2007/10/18/tip-running-command-line-shell-commands-in-ruby-using-x/#comment-189</guid>
		<description>Hey there,    Thought I&#039;d let you know there are a few different ways - I didn&#039;t know about %x, but it is very similar to the backtick (`). Example:    `dig yahoo.com`  `dig #{domain}`    Double quote rules apply. Of course, I might start adopting the %x[]  format for readability - unless you are using an IDE or VIM (my choice) with syntax highlighting, backticks are hard to spot.</description>
		<content:encoded><![CDATA[<p>Hey there,    Thought I&#8217;d let you know there are a few different ways &#8211; I didn&#8217;t know about %x, but it is very similar to the backtick (`). Example:    `dig yahoo.com`  `dig #{domain}`    Double quote rules apply. Of course, I might start adopting the %x[]  format for readability &#8211; unless you are using an IDE or VIM (my choice) with syntax highlighting, backticks are hard to spot.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- Quick Cache: failed to write cache. The cache/ directory is either non-existent ( and could not be created ) or it is not writable. -->
