home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.shell
- Path: sparky!uunet!spool.mu.edu!sol.ctr.columbia.edu!emory!athena.cs.uga.edu!marie!david
- From: david@marie.stat.uga.edu (David Gundlach)
- Subject: Re: suicidal kill command ?
- Message-ID: <1992Nov7.193838.18009@athena.cs.uga.edu>
- Sender: news@athena.cs.uga.edu
- Organization: UGA Statistics Department
- References: <1992Oct31.192155.3021@nic.csu.net <1992Nov3.022415.12993@athena.cs.uga.edu> <TTN.92Nov6024042@sepelrastas.cs.tut.fi>
- Date: Sat, 7 Nov 1992 19:38:38 GMT
- Lines: 40
-
- And then in <TTN.92Nov6024042@sepelrastas.cs.tut.fi>, ttn@cs.tut.fi (Tero Nieminen) said...
- % In article <1992Nov3.022415.12993@athena.cs.uga.edu> david@marie.stat.uga.edu (David Gundlach) writes:
- %
- % Here it is, a one-line shell script:
- %
- % echo "Killing '$1' processes..."; kill $2 `ps -agux | grep $1 | sort | awk '{print $2}'`
- %
- % One useful thing to chek is "which kill". It might say "kill: shell
- % built-in command". In that case you have to use another kill for the job
-
- Oops; mine does. A tcsh user :-)
-
- % (ie. /bin/kill -9 -1). That does the tric on machines over here.
-
- Of course, this was a shell script, and I program all of my scripts
- (well, nearly all) in sh, so it worked and I never knew about the
- problem. Hully gee.
-
- %
- % At least csh/tcsh users should watch out for this..
-
- Thanks :-)
-
- % --
- % Tero Nieminen Tampere University of Technology
- % ttn@cs.tut.fi Tampere, Finland, Europe
-
-
-
- :-D
- --
- David Gundlach david@marie.stat.uga.edu
- System Support and Integration david@rolf.stat.uga.edu
- UGA Statistics david@castor.cs.uga.edu
- University of Georgia david@groucho.dev.uga.edu
- 706/542-3289 or 706/542-5232 BITNET: statuga@uga
-
- "I think, therefore I am wrong." -- me
-
-
-