#!/bin/csh -f # # kills all occurence of processes running program "$1" # # Kevin P. Inscoe (kevin@inscoe.org) # # set pid = `/bin/ps -e -o "%P: %p: %a" | /bin/grep $1 | /bin/grep -v dgsp | /bin/sort -b -n | /bin/cut -f2 -d':'` foreach p ( $pid ) /bin/echo killing...; /bin/ps $p | /bin/grep -v PID /bin/kill $p #/bin/sleep 4 end