Actually, I don't think there's a command that will do what you want
directly, but a shell or perl script should be able to do it. Here's a draft
of a perl example (not tested, so watch for errors, small or large):

#!/usr/bin/perl

@killlist = split( /\n/`ps -ax |grep processname`/ )  ;
foreach $process ( @killlist )
        {
        @entries = split (/\s/$process/ )      ;
        $dummy = ` kill @entries[0]` ;
        }       ;

# eop


At 05:17 PM 2/25/99 -0000, Dan Browning (Network Admin) wrote [abriged version]:
>1.  There must be a command out there that translates the name of a process
>into it's PID, what is it?
>
>2.  How could I kill all processes that have a certain name?  What about
>killing all processes with a certain pattern in their name, how could I do
>that?
>
>I'm thinking:
>
># kill | (trans_processid *pat[]tern*)
>   ^-whatever that command is

------------------------------------"Never tell me the odds!"---
Ray Olszewski                                        -- Han Solo
762 Garland Drive
Palo Alto, CA  94303-3603
650.321.3561 voice     650.322.1209 fax          [EMAIL PROTECTED]        
----------------------------------------------------------------

Reply via email to