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

[no subject]



ssh machine "ps ax|grep namd|grep -v grep| awk '{print($1)}'|xargs kill"

I am trying to get the PIDs for the process namd piped into the kill command on the machine.  If I ssh into the machine and run this command at the shell it works just fine.  Via the ssh command it has syntax problems on the awk statement.  Specifically it says this:
awk: cmd. line:1: {print()}
awk: cmd. line:1:        ^ syntax error
awk: cmd. line:1: {print()}
awk: cmd. line:1:         ^ syntax error
usage: kill [ -s signal | -p ] [ -a ] pid ...
       kill -l [ signal ]

So the () is giving the problem?  I've tried protecting it with \( but that doesn't work.
Any thoughts,
Dow


No sig.


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<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="00387" href="msg00387.html">[ale] Syntax problem</a></strong>
<ul><li><em>From:</em> esoteric at 3times25.net (Geoffrey)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00357.html">[ale] Talk Google</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00359.html">[ale] Syntax problem</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00412.html">[ale] Talk Google</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00359.html">[ale] Syntax problem</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00358"><strong>Date</strong></a></li>
<li><a href="threads.html#00358"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

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