Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!purdue!ames!topgun.dspo.gov!lanl!opus!dante!tgardenh From: tgardenh@nmsu.edu (Tricia Gardenhire) Newsgroups: comp.unix.questions Subject: Killing with awk and grep Message-ID: <303@opus.NMSU.EDU> Date: 10 Aug 89 21:35:46 GMT Distribution: usa Lines: 16 Hi, I've been reading the man pages for awk, but they just aren't that helpful. So here is my question: I want to create a shell script that will look at ps -aux for a certain process called '-sleeper' and then kill it. I've figured out how to search for it using grep and how to display the PID with awk. But, I have no idea how to use these with kill in mind. Something else I'm sure you will know, how do I keep the script from killing itself? Grep will find everything with the word '-sleeper' including the grep command finding the word. Any ideas. Please email responses to tgardenh@nmsu.edu and I'll summarize if there is enough interest. Thanks, in advance, for any and all help. -Tricia