From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1020c6,bedbbee8b27b663b X-Google-Attributes: gid1020c6,public X-Google-Thread: fee84,bedbbee8b27b663b X-Google-Attributes: gidfee84,public From: patchkov@acs1.acs.ucalgary.ca (Serguei Patchkovskii) Subject: Re: killing a process by name? Date: 1999/06/08 Message-ID: <7jjste$768@ds2.acs.ucalgary.ca>#1/1 X-Deja-AN: 487203589 References: <375d6a41.14695581@news.aurora.edu> Organization: The University of Calgary Followup-To: comp.unix.osf.osf1,comp.unix.admin Newsgroups: comp.unix.osf.osf1,comp.unix.admin 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/