From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1020c6,bedbbee8b27b663b,start X-Google-Attributes: gid1020c6,public X-Google-Thread: fee84,bedbbee8b27b663b,start X-Google-Attributes: gidfee84,public From: ckolar@aurora.edu (Christopher Kolar) Subject: killing a process by name? Date: 1999/06/08 Message-ID: <375d6a41.14695581@news.aurora.edu>#1/1 X-Deja-AN: 487186266 Content-Transfer-Encoding: 7bit X-Trace: 8 Jun 1999 14:18:33 -0600, kolar.facnet.aurora.edu Organization: Aurora University Content-Type: text/plain; charset=us-ascii MIME-Version: 1.0 Newsgroups: comp.unix.osf.osf1,comp.unix.admin Hello everyone. This is probably a basic question, but I have not found the solution yet so I thought I would float it. I have a host running OSF 4.0d. After everyone leaves for the day I am going to have cron start a program "foo". Foo should run until midnight, when it needs to be killed so that out nightly backups can happen. Problem is that: a) foo has no -kill or similar tag; b) foo does not drop the process number into a pid file that can be piped into a kill command. 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 programmer, and only play a system administrator on TV, so those are two strikes against me. Any help or pointers to the right resources would be much appreciated. --chris -- /////\\\\\/////\\\\\ Christopher G. Kolar Director of Instructional Technology Aurora University, Aurora, Illinois ckolar@aurora.edu -- www.aurora.edu [Public Key http://certserver.pgp.com:11371/pks/lookup2?op=index&search=0x5B61A799]