Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!uunet!systech!dan From: dan@systech.bjorn.COM (Dan Gill) Newsgroups: comp.unix.questions Subject: Re: killing processes thru' C programs Summary: add a c to suppress the grep Message-ID: <878@systech.bjorn.COM> Date: 30 Apr 91 04:00:27 GMT References: <1991Apr24.144240.3322@uoft02.utoledo.edu> <1991Apr29.054531.4981@athena.mit.edu> Organization: Systech Corp., San Diego, CA Lines: 18 > ps ux | awk '/name/ && !/awk/ {print $2}' > > You replace "name" with the name of the process for which you are > searching. > > them, and print the PID's for those lines. Note that the "!/awk/" > above prevents the awk process for being listed. if you use ps uxc | grep name | awk '{print $2}' the only thing displayed is the pid of the processes name. You should be careful for if you used vi as the name, there could be some unhappy campers in your KOA. Dg -- ------------------------------------------------------------------------------- "On second thought, let us not go to Camelot. It is a silly place" Dan Gill [uunet ucsd.edu]!systech!dan -------------------------------------------------------------------------------