home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk1.iso / altsrc / articles / 10572 < prev    next >
Internet Message Format  |  1994-06-19  |  2KB

  1. Path: wupost!math.ohio-state.edu!howland.reston.ans.net!pipex!uknet!EU.net!uunet!news.claremont.edu!nntp-server.caltech.edu!news
  2. From: mazer@asterix.etho.caltech.edu (Jamie Mazer)
  3. Newsgroups: alt.sources
  4. Subject: Re: S-Kill [1/1]  Kill by process name.
  5. Date: 05 Jun 1994 21:49:51 GMT
  6. Organization: Div. of Biology, Caltech
  7. Lines: 25
  8. Message-ID: <MAZER.94Jun5144951@asterix.etho.caltech.edu>
  9. References: <2slfh2$f19@oak.oakland.edu> <CqsGEH.J0o@cbfsb.cb.att.com>
  10. NNTP-Posting-Host: asterix.etho.caltech.edu
  11. In-reply-to: philf@cbnewsf.cb.att.com's message of Thu, 2 Jun 1994 21:15:52 GMT
  12.  
  13. In article philf@cbnewsf.cb.att.com (phillipe.fischer) writes:
  14.    In article jggoslin@vela.acs.oakland.edu (Monument) writes:
  15.    >I happened to make this last time I was bored, and saw that the
  16.    >interest was there.  It's written in C, and does pretty much what
  17.    >"name-kill" does, except that it can use any portion of the name.  The
  18.    >drawback to this, however, is that it automatically kills anything
  19.    >that matches the search string, WITHOUT CHECKING.  
  20.    >any suggestions or patches to upgrade it, please email me
  21.    >
  22.    This works for me:
  23.    alias slay    set j=`ps -ax|grep !*|head -1`; kill -9 `echo $j[1]`
  24.  
  25. Sorry, I just couldn't resist, this works for me
  26.  
  27.   alias slay "ps -ax|grep \!*|grep -v grep|cut -s -c1-5|xargs kill -9"
  28.  
  29. No messy temp vars left about :-b This one kills ALL matches..
  30.  
  31. /Jamie
  32. -- 
  33. EMAIL:mazer@asterix.etho.caltech.edu PHONE:(818)395-6816 FAX:(818)449-0679
  34.     USMAIL: Div. of Biology 216-76, Caltech, Pasadena, CA, USA 91125
  35.                            It's a hand me down, the thoughts are broken,
  36.                                 perhaps they're better left unsung
  37.                             ... If I knew the way, I'd take you home...
  38.