plan9fox/rc/bin/slay

8 lines
128 B
Text
Raw Normal View History

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