plan9fox/rc/bin/broke

9 lines
137 B
Text
Raw Permalink Normal View History

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