#! /bin/sh
kill "f8" jobs

[ -n "${1}" ]&&{ u=${1};shift; }||u=hp
[ -n "${1}" ]&&p=${1}||p=f8
[ "$(id -nu)" == "root" ]&&s=||s=sudo
c="-c ${p}"

${s} kill -9 $(($(/usr/sbin/lsof -a -b -u ${u} ${c} 2>/dev/null|grep "/${p}"|cut -d\  -f2-|cut -d$(echo "${u}"|cut -c1) -f1)))
