From: patchkov@acs1.acs.ucalgary.ca (Serguei Patchkovskii)
Subject: Re: killing a process by name?
Date: 1999/06/08 [thread overview]
Message-ID: <7jjste$768@ds2.acs.ucalgary.ca> (raw)
In-Reply-To: 375d6a41.14695581@news.aurora.edu
Christopher Kolar (ckolar@aurora.edu) wrote:
: So my question, is ther a simple way to set up a shell script that
: cron can call at midnight that will grep "foo" out of the ps command,
: and then kill -PID for foo? I am not much of a shell script
How about:
ps -eo pid,command|awk '$2=="foo"{print$1}'|xargs -n1 kill
/Serge.P
--
home page: http://www.cobalt.chem.ucalgary.ca/ps/
next prev parent reply other threads:[~1999-06-08 4:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-06-08 4:00 killing a process by name? Christopher Kolar
1999-06-08 4:00 ` Serguei Patchkovskii [this message]
1999-06-09 4:00 ` Mark Lambert
1999-06-09 4:00 ` Paul David Fardy
1999-06-09 4:00 ` Adam Price
1999-06-10 4:00 ` Bruno KRINER
1999-06-09 4:00 ` Jeff Denham
1999-06-16 4:00 ` Tim Mooney
1999-06-16 4:00 ` Jeff Denham
1999-06-09 4:00 ` Javier de Burgos
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox