plan9/rc/bin/kill

9 lines
142 B
Bash
Executable File

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