<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: bash script to check if a process instance is running</title>
	<atom:link href="http://bkpavan.wordpress.com/2008/07/09/bash-script-to-check-ifprocess-instance-is-running/feed/" rel="self" type="application/rss+xml" />
	<link>http://bkpavan.wordpress.com/2008/07/09/bash-script-to-check-ifprocess-instance-is-running/</link>
	<description>ignotum per ignotius</description>
	<lastBuildDate>Wed, 19 Aug 2009 17:00:50 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Menda</title>
		<link>http://bkpavan.wordpress.com/2008/07/09/bash-script-to-check-ifprocess-instance-is-running/#comment-121</link>
		<dc:creator>Menda</dc:creator>
		<pubDate>Fri, 19 Dec 2008 23:51:29 +0000</pubDate>
		<guid isPermaLink="false">http://bkpavan.wordpress.com/?p=96#comment-121</guid>
		<description>This one is the best:

if [ &quot;$(pidof processname)&quot; ] ; then
  echo &#039;Process is running...&#039;
fi</description>
		<content:encoded><![CDATA[<p>This one is the best:</p>
<p>if [ "$(pidof processname)" ] ; then<br />
  echo &#8216;Process is running&#8230;&#8217;<br />
fi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pavan</title>
		<link>http://bkpavan.wordpress.com/2008/07/09/bash-script-to-check-ifprocess-instance-is-running/#comment-90</link>
		<dc:creator>Pavan</dc:creator>
		<pubDate>Thu, 14 Aug 2008 03:40:14 +0000</pubDate>
		<guid isPermaLink="false">http://bkpavan.wordpress.com/?p=96#comment-90</guid>
		<description>pgrep utility can also be used to achieve the above mentioned task;
pgrep examines the active processes on the system and reports the process IDs of the processes.

eg.
run_count=`pgrep ${process} &#124; wc -l`
OR more succinctly
run_count=`pgrep ${process} -c`</description>
		<content:encoded><![CDATA[<p>pgrep utility can also be used to achieve the above mentioned task;<br />
pgrep examines the active processes on the system and reports the process IDs of the processes.</p>
<p>eg.<br />
run_count=`pgrep ${process} | wc -l`<br />
OR more succinctly<br />
run_count=`pgrep ${process} -c`</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: VowFoeloferop</title>
		<link>http://bkpavan.wordpress.com/2008/07/09/bash-script-to-check-ifprocess-instance-is-running/#comment-83</link>
		<dc:creator>VowFoeloferop</dc:creator>
		<pubDate>Sun, 03 Aug 2008 08:30:27 +0000</pubDate>
		<guid isPermaLink="false">http://bkpavan.wordpress.com/?p=96#comment-83</guid>
		<description>I agreed with you</description>
		<content:encoded><![CDATA[<p>I agreed with you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pavan</title>
		<link>http://bkpavan.wordpress.com/2008/07/09/bash-script-to-check-ifprocess-instance-is-running/#comment-78</link>
		<dc:creator>Pavan</dc:creator>
		<pubDate>Wed, 23 Jul 2008 16:25:37 +0000</pubDate>
		<guid isPermaLink="false">http://bkpavan.wordpress.com/?p=96#comment-78</guid>
		<description>@Pernod,
Thanks for pointing out, I updated my post. 
For those who are curious about &#039;shebang&#039;, visit &lt;a&gt;http://en.wikipedia.org/wiki/Shebang_(Unix)&lt;/a&gt;&quot;</description>
		<content:encoded><![CDATA[<p>@Pernod,<br />
Thanks for pointing out, I updated my post.<br />
For those who are curious about &#8217;shebang&#8217;, visit <a>http://en.wikipedia.org/wiki/Shebang_(Unix)</a>&#8220;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pernod</title>
		<link>http://bkpavan.wordpress.com/2008/07/09/bash-script-to-check-ifprocess-instance-is-running/#comment-77</link>
		<dc:creator>Pernod</dc:creator>
		<pubDate>Wed, 23 Jul 2008 15:49:33 +0000</pubDate>
		<guid isPermaLink="false">http://bkpavan.wordpress.com/?p=96#comment-77</guid>
		<description>You may want to correct the shebang as well - remove the  blank like in
#!/bin/bash</description>
		<content:encoded><![CDATA[<p>You may want to correct the shebang as well &#8211; remove the  blank like in<br />
#!/bin/bash</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pavan</title>
		<link>http://bkpavan.wordpress.com/2008/07/09/bash-script-to-check-ifprocess-instance-is-running/#comment-57</link>
		<dc:creator>Pavan</dc:creator>
		<pubDate>Wed, 09 Jul 2008 18:11:23 +0000</pubDate>
		<guid isPermaLink="false">http://bkpavan.wordpress.com/?p=96#comment-57</guid>
		<description>@Vinod
Thanks for the correction. I had tested this script under Cygwin and it worked just fine. However I incorporated the correction suggested by you and it should work consistently across *NIX.</description>
		<content:encoded><![CDATA[<p>@Vinod<br />
Thanks for the correction. I had tested this script under Cygwin and it worked just fine. However I incorporated the correction suggested by you and it should work consistently across *NIX.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vinod</title>
		<link>http://bkpavan.wordpress.com/2008/07/09/bash-script-to-check-ifprocess-instance-is-running/#comment-55</link>
		<dc:creator>Vinod</dc:creator>
		<pubDate>Wed, 09 Jul 2008 10:55:17 +0000</pubDate>
		<guid isPermaLink="false">http://bkpavan.wordpress.com/?p=96#comment-55</guid>
		<description>did you test this script ?
you have to use 
ps eax &#124; grep ${process} &#124; grep -v grep &#124; wc -l 
if you dont want to count the grep command!</description>
		<content:encoded><![CDATA[<p>did you test this script ?<br />
you have to use<br />
ps eax | grep ${process} | grep -v grep | wc -l<br />
if you dont want to count the grep command!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
