[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How do I make a start script



On Sat, Jun 15, 2002 at 09:06:49AM +0200, Søren Neigaard wrote:
| I need to make a script that can find the PID for a Java application,
| where the process string contains 'proximus', and 'kill -9' that
| process. My Java process spawns quite some threads, so I need to kill
| the main process, not one of the threads.
| 
| How do I do this, I have no clue, and no shell programming experience,
| so please explain it to me carefully, a complete example would just be
| great, with some explanation so I don't have to ask again :)

kill -9 `pidof java | grep proximus`

This assumes the program is run as "java".  (note: those are backtics
above, not single quotes)

HTH,
-D

-- 

If we claim to be without sin, we deceive ourselves and the truth is not
in us.
        I John 1:8
 
http://dman.ddts.net/~dman/

Attachment: pgp19wFxCivXc.pgp
Description: PGP signature


Reply to: