ref: c57fe0690fd947c8f285d6a87319c07408ada42f
parent: d8e4904d0aac4d67a1953eb8c5ad46c070bf1a94
author: stanley lieber <stanley.lieber@gmail.com>
date: Mon Apr 14 17:01:55 EDT 2014
aanuke: only print commands to kill the current user's aan procs
--- a/rc/bin/aanuke
+++ b/rc/bin/aanuke
@@ -1,6 +1,6 @@
#!/bin/rc
rfork e
-for(i in `{ps | grep -e '[ ]+aan$' | awk '{print $2}'}){
+for(i in `{psu | awk '/[ ]+aan$/ {print $2}'}){
if(! grep -s -e '[ ]+\/net(\.alt)?\/tcp\/[0-9]+\/data$' /proc/$i/fd)
echo '@{echo kill>/proc/'$i'/note} # aan (idle)'
}