Added ukill(1): Kills all processes started by a user

This commit is contained in:
Matthew Veety 2015-05-13 18:48:46 -04:00
parent aa0a20ed6e
commit e8c3eb87d2

12
rc/bin/ukill Normal file
View file

@ -0,0 +1,12 @@
#!/bin/rc
rfork e
if(~ $#1 0){
USER=`{cat /dev/user}
}
if not {
USER=$1
}
PROCS=`{ps | grep $USER | awk '{print $2}'}
for(i in $PROCS){
echo '@{echo kill>/proc/'^$i^'/note}'
}