aanuke: only print commands to kill the current user's aan procs

This commit is contained in:
stanley lieber 2014-04-14 21:01:55 -04:00
parent d8e4904d0a
commit c57fe0690f

View file

@ -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)'
}