diff options
author | Matthew Veety <mveety@gmail.com> | 2015-05-13 18:48:46 -0400 |
---|---|---|
committer | Matthew Veety <mveety@gmail.com> | 2015-05-13 18:48:46 -0400 |
commit | e8c3eb87d27f95a9a0b89a93164dba42427659ec (patch) | |
tree | b964c132dda62b017942419a24fe2896acfe3bb7 /rc | |
parent | aa0a20ed6ec2cd3d042dd1d8b93195eb14440763 (diff) | |
download | plan9front-e8c3eb87d27f95a9a0b89a93164dba42427659ec.tar.xz |
Added ukill(1): Kills all processes started by a user
Diffstat (limited to 'rc')
-rw-r--r-- | rc/bin/ukill | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/rc/bin/ukill b/rc/bin/ukill new file mode 100644 index 000000000..f2773bbd5 --- /dev/null +++ b/rc/bin/ukill @@ -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}' +} |