Kill all my processes in current Unix machine (shell script)
This is a korn shell script, but should work in other shell with little change or none.
#created by Anthony Yio, 28 Dec 06
#!/bin/ksh
MYUSER=`whoami`
for MYPID in `ps -ef | grep $MYUSER | awk '{ print $(2) }' | sort -r`
do
`kill -9 $MYPID`
done
Comments