[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



No. killall uses the name of the process whereas kill uses the PID.
> 
> > On Wed, 2005-08-24 at 11:29 -0400, Scott Warfield wrote:
> > > you need the quotes to pass everything as an argument to ssh to be
> > > executed by the remote server.  in this case, ps ax runs remotely piping
> > > the output locally to grep resulting in an attempt to kill a pid that
> > > may not exist at best... at worst, well, you can guess ;)
> > > 
> > > answer to this.... escape $.  "\$1"
> > > 
> > > ssh machine "ps ax|grep namd|grep -v grep| awk '{print(\$1)}'|xargs
> > > kill"
> > > 
> > > On Wed, 2005-08-24 at 11:00 -0400, Jim Popovitch wrote:
> > > > On Wed, 2005-08-24 at 10:52 -0400, Dow_Hurst wrote:
> > > > > What is the proper way to get this command to work:
> > > > > 
> > > > > ssh machine "ps ax|grep namd|grep -v grep| awk '{print($1)}'|xargs kill"
> > > > 
> > > > Try this (no double quotes):
> > > >  ssh machine ps ax|grep namd|grep -v grep| awk '{print($1)}'|xargs kill
> > > > 
> > > > 
> > > > -Jim P.
> > > > 
> > > > 
> > > > 
> > > > _______________________________________________
> > > > Ale mailing list
> > > > Ale at ale.org
&gt; &gt; &gt; &gt; <a  rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale";>http://www.ale.org/mailman/listinfo/ale</a>
&gt; &gt; &gt; 
&gt; &gt; &gt; _______________________________________________
&gt; &gt; &gt; Ale mailing list
&gt; &gt; &gt; Ale at ale.org
&gt; &gt; &gt; <a  rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale";>http://www.ale.org/mailman/listinfo/ale</a>
&gt; &gt; _______________________________________________
&gt; &gt; Ale mailing list
&gt; &gt; Ale at ale.org
&gt; &gt; <a  rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale";>http://www.ale.org/mailman/listinfo/ale</a>
&gt; 
&gt; _______________________________________________
&gt; Ale mailing list
&gt; Ale at ale.org
&gt; <a  rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale";>http://www.ale.org/mailman/listinfo/ale</a>
-- 
James P. Kinney III          \Changing the mobile computing world/
CEO &amp; Director of Engineering \          one Linux user         /
Local Net Solutions,LLC        \           at a time.          /
770-493-8244                    \.___________________________./
<a  rel="nofollow" href="http://www.localnetsolutions.com";>http://www.localnetsolutions.com</a>

GPG ID: 829C6CA7 James P. Kinney III (M.S. Physics)
&lt;jkinney at localnetsolutions.com&gt;
Fingerprint = 3C9E 6366 54FC A3FE BA4D 0659 6190 ADC3 829C 6CA7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part



</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00386" href="msg00386.html">[ale] Syntax problem</a></strong>
<ul><li><em>From:</em> rramsdell at adelphia.net (Randy C. Ramsdell)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00358" href="msg00358.html">[ale] Syntax problem</a></strong>
<ul><li><em>From:</em> dhurst at mindspring.com (Dow_Hurst)</li></ul></li>
<li><strong><a name="00359" href="msg00359.html">[ale] Syntax problem</a></strong>
<ul><li><em>From:</em> jimpop at yahoo.com (Jim Popovitch)</li></ul></li>
<li><strong><a name="00360" href="msg00360.html">[ale] Syntax problem</a></strong>
<ul><li><em>From:</em> smw at malamber.org (Scott Warfield)</li></ul></li>
<li><strong><a name="00361" href="msg00361.html">[ale] Syntax problem</a></strong>
<ul><li><em>From:</em> jkinney at localnetsolutions.com (James P. Kinney III)</li></ul></li>
<li><strong><a name="00370" href="msg00370.html">[ale] Syntax problem</a></strong>
<ul><li><em>From:</em> rramsdell at adelphia.net (Randy C. Ramsdell)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00380.html">[ale] Cannot chown unowned files</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00382.html">[ale] Cannot chown unowned files</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00370.html">[ale] Syntax problem</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00386.html">[ale] Syntax problem</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00381"><strong>Date</strong></a></li>
<li><a href="threads.html#00381"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>