home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / shell / 3699 < prev    next >
Encoding:
Internet Message Format  |  1992-08-30  |  986 b 

  1. Xref: sparky comp.unix.shell:3699 comp.unix.questions:10544
  2. Newsgroups: comp.unix.shell,comp.unix.questions,netcom.general
  3. Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!jvnc.net!yale.edu!qt.cs.utexas.edu!cs.utexas.edu!sun-barr!decwrl!csus.edu!netcom.com!westes
  4. From: westes@netcom.com (Will Estes)
  5. Subject: Need Script To Kill Process Using Substring Of Application Name
  6. Message-ID: <x6gnwvc.westes@netcom.com>
  7. Date: Sun, 30 Aug 92 23:07:51 GMT
  8. Organization: Mail Group
  9. Lines: 13
  10.  
  11. Does anyone have a script that they could send to me that will take as
  12. its input some substring and then kill any process you own that has that
  13. substring in its application name?  So the script would do something
  14. like:
  15.  
  16.     ps guaxww | grep "some_substring"
  17.  
  18. then it would exclude the line that contained the grep command, locate
  19. the PID of the remaining processes, and kill each one.  Please post the
  20. script for others to see if its short enough.
  21.  
  22. Thanks,
  23. Will Estes        Internet: westes@netcom.com
  24.