#!/bin/sh # $Header: /home/harrison/c/tcgmsg/ipcv4.0/RCS/zapit.bsd,v 1.1 91/12/06 17:28:03 harrison Exp Locker: harrison $ # # kill -9 all processes which contain the first argument ... bsd version # if test "$1" = "" then echo "Usage: zapit stringpattern" exit 1 fi for i in `ps -gx | grep $1| grep -v zapit | awk '{printf("%d\t",$1)}'` do if test "$i" != $$ then kill -9 $i fi done