plan9fox/rc/bin/Kill

5 lines
116 B
Plaintext
Raw Normal View History

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