<?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: Executing System Commands with ColdFusion</title>
	<atom:link href="http://blog.stannard.net.au/2007/09/21/executing-system-commands-with-coldfusion/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.stannard.net.au/2007/09/21/executing-system-commands-with-coldfusion/</link>
	<description></description>
	<lastBuildDate>Sun, 08 Jan 2012 15:53:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: Executing System Commands with ColdFusion</title>
		<link>http://blog.stannard.net.au/2007/09/21/executing-system-commands-with-coldfusion/comment-page-1/#comment-1510</link>
		<dc:creator>Executing System Commands with ColdFusion</dc:creator>
		<pubDate>Wed, 02 Mar 2011 20:59:17 +0000</pubDate>
		<guid isPermaLink="false">#comment-1510</guid>
		<description>[...] This is an update to a previous entry. [...]</description>
		<content:encoded><![CDATA[<p>[...] This is an update to a previous entry. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Indy</title>
		<link>http://blog.stannard.net.au/2007/09/21/executing-system-commands-with-coldfusion/comment-page-1/#comment-1508</link>
		<dc:creator>Indy</dc:creator>
		<pubDate>Wed, 02 Mar 2011 20:10:56 +0000</pubDate>
		<guid isPermaLink="false">#comment-1508</guid>
		<description>Nice one. But as another person noted earlier, the java option also has its limits.

If one was to execute something like &lt;code&gt;ps -ef &#124; grep &#039;java&#039;&lt;/code&gt;, it does not work. I&#039;m sure there are many other examples.

I&#039;m surprised that CF makes  such a mysterious (and a bit unusable) command. The only way I can reliably get it to work is to first write to a bat/shell script. And then execute that. This approach works well if you have limited requests of this nature. It does not scale.

Ruby/Rails on the other had, provides a simple and powerful way to do this. Normally I don&#039;t end up using either Ruby or ROR, but I think I might have to end up using it as issuing system commands is a critical part of the app that I&#039;m working on at the moment.</description>
		<content:encoded><![CDATA[<p>Nice one. But as another person noted earlier, the java option also has its limits.</p>
<p>If one was to execute something like <code>ps -ef | grep 'java'</code>, it does not work. I&#8217;m sure there are many other examples.</p>
<p>I&#8217;m surprised that CF makes  such a mysterious (and a bit unusable) command. The only way I can reliably get it to work is to first write to a bat/shell script. And then execute that. This approach works well if you have limited requests of this nature. It does not scale.</p>
<p>Ruby/Rails on the other had, provides a simple and powerful way to do this. Normally I don&#8217;t end up using either Ruby or ROR, but I think I might have to end up using it as issuing system commands is a critical part of the app that I&#8217;m working on at the moment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kelly</title>
		<link>http://blog.stannard.net.au/2007/09/21/executing-system-commands-with-coldfusion/comment-page-1/#comment-308</link>
		<dc:creator>Kelly</dc:creator>
		<pubDate>Thu, 13 Dec 2007 08:35:10 +0000</pubDate>
		<guid isPermaLink="false">#comment-308</guid>
		<description>Very nice and useful method. It solves my problem</description>
		<content:encoded><![CDATA[<p>Very nice and useful method. It solves my problem</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevan Stannard</title>
		<link>http://blog.stannard.net.au/2007/09/21/executing-system-commands-with-coldfusion/comment-page-1/#comment-306</link>
		<dc:creator>Kevan Stannard</dc:creator>
		<pubDate>Wed, 07 Nov 2007 02:43:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-306</guid>
		<description>Hi Sami, great!</description>
		<content:encoded><![CDATA[<p>Hi Sami, great!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sami Hoda</title>
		<link>http://blog.stannard.net.au/2007/09/21/executing-system-commands-with-coldfusion/comment-page-1/#comment-305</link>
		<dc:creator>Sami Hoda</dc:creator>
		<pubDate>Tue, 06 Nov 2007 15:20:05 +0000</pubDate>
		<guid isPermaLink="false">#comment-305</guid>
		<description>Nice work. I&#039;m using this in a project!</description>
		<content:encoded><![CDATA[<p>Nice work. I&#8217;m using this in a project!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevan Stannard</title>
		<link>http://blog.stannard.net.au/2007/09/21/executing-system-commands-with-coldfusion/comment-page-1/#comment-309</link>
		<dc:creator>Kevan Stannard</dc:creator>
		<pubDate>Sat, 27 Oct 2007 00:53:54 +0000</pubDate>
		<guid isPermaLink="false">#comment-309</guid>
		<description>Unfortunately there is a problem with this method - this may work for some applications but not all.

The standard error stream and standard output streams should not be read sequentially - rather they should be read simultaneously. If they are not read simultaneously then the process may &#039;block&#039; and appear to hang.

So where to from here?

1) Use the Batch File Wrapper method mentioned above, but this results in a few temp files that need to be cleaned up.

2) Write a bit of Java code to do the work for you and call it from within CF.

3) Possibly do this in CF8. The CFTHREAD tag might allow this to be done. Not sure.</description>
		<content:encoded><![CDATA[<p>Unfortunately there is a problem with this method &#8211; this may work for some applications but not all.</p>
<p>The standard error stream and standard output streams should not be read sequentially &#8211; rather they should be read simultaneously. If they are not read simultaneously then the process may &#8216;block&#8217; and appear to hang.</p>
<p>So where to from here?</p>
<p>1) Use the Batch File Wrapper method mentioned above, but this results in a few temp files that need to be cleaned up.</p>
<p>2) Write a bit of Java code to do the work for you and call it from within CF.</p>
<p>3) Possibly do this in CF8. The CFTHREAD tag might allow this to be done. Not sure.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Stockton</title>
		<link>http://blog.stannard.net.au/2007/09/21/executing-system-commands-with-coldfusion/comment-page-1/#comment-307</link>
		<dc:creator>David Stockton</dc:creator>
		<pubDate>Fri, 21 Sep 2007 08:48:04 +0000</pubDate>
		<guid isPermaLink="false">#comment-307</guid>
		<description>Nice to know I&#039;m not the only one stuck interfacing with certain apps that need to be called from the CLI.

Good article.</description>
		<content:encoded><![CDATA[<p>Nice to know I&#8217;m not the only one stuck interfacing with certain apps that need to be called from the CLI.</p>
<p>Good article.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

