<?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: Bash script or command to get a process id</title>
	<atom:link href="http://stii.co.za/linux/bash-script-or-command-to-get-a-process-id/feed/" rel="self" type="application/rss+xml" />
	<link>http://stii.co.za/linux/bash-script-or-command-to-get-a-process-id/</link>
	<description>You&#039;re never too old for a happy childhood</description>
	<lastBuildDate>Fri, 03 Feb 2012 02:53:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: joshua paul</title>
		<link>http://stii.co.za/linux/bash-script-or-command-to-get-a-process-id/comment-page-1/#comment-5087</link>
		<dc:creator>joshua paul</dc:creator>
		<pubDate>Thu, 12 Jan 2012 12:10:06 +0000</pubDate>
		<guid isPermaLink="false">http://stii.co.za/?p=269#comment-5087</guid>
		<description>thanks! this was good for killing the google chrome helper bug which uses 100% cpu on the mac.

here&#039;s what i used:


kill -9 `ps -eo pid,%cpu,comm &#124; grep &quot;Google Chrome Helper.app&quot; &#124; grep &quot;100&quot; &#124; cut -c1-6`</description>
		<content:encoded><![CDATA[<p>thanks! this was good for killing the google chrome helper bug which uses 100% cpu on the mac.</p>
<p>here&#8217;s what i used:</p>
<p>kill -9 `ps -eo pid,%cpu,comm | grep &#8220;Google Chrome Helper.app&#8221; | grep &#8220;100&#8243; | cut -c1-6`</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: allan</title>
		<link>http://stii.co.za/linux/bash-script-or-command-to-get-a-process-id/comment-page-1/#comment-5011</link>
		<dc:creator>allan</dc:creator>
		<pubDate>Tue, 08 Nov 2011 13:21:12 +0000</pubDate>
		<guid isPermaLink="false">http://stii.co.za/?p=269#comment-5011</guid>
		<description>hmmm, above post seemed to lose what i&#039;d written between brackets.  

Should be:
ps -C&#039;command&#039; -opid --noheading

above command has the advantage of needing no special packages, jsut plain old bash.</description>
		<content:encoded><![CDATA[<p>hmmm, above post seemed to lose what i&#8217;d written between brackets.  </p>
<p>Should be:<br />
ps -C&#8217;command&#8217; -opid &#8211;noheading</p>
<p>above command has the advantage of needing no special packages, jsut plain old bash.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: allan</title>
		<link>http://stii.co.za/linux/bash-script-or-command-to-get-a-process-id/comment-page-1/#comment-5010</link>
		<dc:creator>allan</dc:creator>
		<pubDate>Tue, 08 Nov 2011 13:13:35 +0000</pubDate>
		<guid isPermaLink="false">http://stii.co.za/?p=269#comment-5010</guid>
		<description>Was trying to do the same.  Eventually (after an unjustifibly long amount of experimenting) i hit upon:

ps -C -opid --noheading

which should print out directly without the need for any greps.</description>
		<content:encoded><![CDATA[<p>Was trying to do the same.  Eventually (after an unjustifibly long amount of experimenting) i hit upon:</p>
<p>ps -C -opid &#8211;noheading</p>
<p>which should print out directly without the need for any greps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NssY</title>
		<link>http://stii.co.za/linux/bash-script-or-command-to-get-a-process-id/comment-page-1/#comment-5007</link>
		<dc:creator>NssY</dc:creator>
		<pubDate>Sat, 05 Nov 2011 02:33:23 +0000</pubDate>
		<guid isPermaLink="false">http://stii.co.za/?p=269#comment-5007</guid>
		<description>pidof processname</description>
		<content:encoded><![CDATA[<p>pidof processname</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nsomnac</title>
		<link>http://stii.co.za/linux/bash-script-or-command-to-get-a-process-id/comment-page-1/#comment-4918</link>
		<dc:creator>nsomnac</dc:creator>
		<pubDate>Fri, 09 Sep 2011 16:27:26 +0000</pubDate>
		<guid isPermaLink="false">http://stii.co.za/?p=269#comment-4918</guid>
		<description>This only works if you have only one instance of you&#039;re shell script running at the same time.  Otherwise you get multiple PIDs.</description>
		<content:encoded><![CDATA[<p>This only works if you have only one instance of you&#8217;re shell script running at the same time.  Otherwise you get multiple PIDs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hanyoud</title>
		<link>http://stii.co.za/linux/bash-script-or-command-to-get-a-process-id/comment-page-1/#comment-689</link>
		<dc:creator>hanyoud</dc:creator>
		<pubDate>Tue, 28 Apr 2009 05:28:29 +0000</pubDate>
		<guid isPermaLink="false">http://stii.co.za/?p=269#comment-689</guid>
		<description>is there one command can return pid of the command after it excuted.

echo $$
echo $!</description>
		<content:encoded><![CDATA[<p>is there one command can return pid of the command after it excuted.</p>
<p>echo $$<br />
echo $!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stii</title>
		<link>http://stii.co.za/linux/bash-script-or-command-to-get-a-process-id/comment-page-1/#comment-264</link>
		<dc:creator>Stii</dc:creator>
		<pubDate>Fri, 23 Jan 2009 11:51:28 +0000</pubDate>
		<guid isPermaLink="false">http://stii.co.za/?p=269#comment-264</guid>
		<description>Thx Dominic, will check it out!</description>
		<content:encoded><![CDATA[<p>Thx Dominic, will check it out!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dominic White</title>
		<link>http://stii.co.za/linux/bash-script-or-command-to-get-a-process-id/comment-page-1/#comment-263</link>
		<dc:creator>Dominic White</dc:creator>
		<pubDate>Fri, 23 Jan 2009 11:08:30 +0000</pubDate>
		<guid isPermaLink="false">http://stii.co.za/?p=269#comment-263</guid>
		<description>Sorry, my brackets were stripped, thats:

pgrep processname

Thanks for the hat tip btw.</description>
		<content:encoded><![CDATA[<p>Sorry, my brackets were stripped, thats:</p>
<p>pgrep processname</p>
<p>Thanks for the hat tip btw.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dominic White</title>
		<link>http://stii.co.za/linux/bash-script-or-command-to-get-a-process-id/comment-page-1/#comment-262</link>
		<dc:creator>Dominic White</dc:creator>
		<pubDate>Fri, 23 Jan 2009 11:07:55 +0000</pubDate>
		<guid isPermaLink="false">http://stii.co.za/?p=269#comment-262</guid>
		<description>I&#039;ve got an even simpler one for you:

pgrep 

I Debian/Ubuntu it&#039;s part of the procps package.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve got an even simpler one for you:</p>
<p>pgrep </p>
<p>I Debian/Ubuntu it&#8217;s part of the procps package.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

