#!/bin/sh if [ "$1" = "" ] then echo "Usage: $0 " exit 1 fi tobekilled=`ps xa | grep $1 | awk '{ print $1 }'` for i in $tobekilled do kill $i done