plan9fox/rc/bin/kill

9 lines
145 B
Plaintext
Raw Normal View History

#!/bin/rc
2011-06-26 20:44:11 +00:00
rfork e
U=`{cat /dev/user}
for(i){
2011-06-26 20:44:11 +00:00
ps | sed -n '/^'$U' .* '$i'$/s%[^ ]* *%~>/proc/%
s% *.* (.*)%/note} # \1%
s%~%@{echo kill%p'
}