plan9fox/rc/bin/slay

7 lines
128 B
Bash
Executable file

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