plan9fox/rc/bin/aanuke

7 lines
189 B
Plaintext
Raw Normal View History

2014-04-14 23:05:57 +00:00
#!/bin/rc
rfork e
for(i in `{psu | awk '/[ ]+aan$/ {print $2}'}){
if(! grep -s -e '[ ]+\/net(\.alt)?\/tcp\/[0-9]+\/data$' /proc/$i/fd)
2014-04-14 23:05:57 +00:00
echo '@{echo kill>/proc/'$i'/note} # aan (idle)'
}