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

Popular posts from this blog

Outlook : "operation failed, object could not be found. " when trying to close a PST.

How to transfer app and data from old iPhone to new iPhone for model IOS17 and IOS18 above.

Troubleshooting Outlook Express (IMAP, POP3, HTTP, NEWS) with the log file