[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: 141: exit policy summary



On Tue, 12 Aug 2008, Peter Palfrader wrote:

> -rw-r--r--  1 weasel weasel 462899 Aug 12 00:56 cons-accept
> -rw-r--r--  1 weasel weasel 432127 Aug 12 00:56 cons-reject
> -rw-r--r--  1 weasel weasel 423023 Aug 12 00:56 cons-shorter
> -rw-r--r--  1 weasel weasel 331860 Aug 12 00:48 consensus

exit-summary is in svn (/projects/dir-stats/trunk).

ES=~/exit-summary
rm -f cons-accept cons-reject cons-shorter
cat consensus | while read line; do
        echo $line >> cons-accept
        echo $line >> cons-reject
        echo $line >> cons-shorter
        if echo $line | grep '^r ' > /dev/null; then
                i=`echo $line | awk '$1=="r" {print $4}'`
                sd=`echo $i | 64216`
                wget -q -O t http://tor.noreply.org:80/tor/server/d/$sd
                if [ "`$ES accept < t`" != "accept " ]; then
                        (echo -n 'p '; $ES accept < t) >> cons-accept
                        (echo -n 'p '; $ES reject < t) >> cons-reject
                        (echo -n 'p '; $ES shorter < t) >> cons-shorter
                fi
        fi
done 


[Note that this killed my zsh on sarge - it wouldn't exit anymore.]
-- 
                           |  .''`.  ** Debian GNU/Linux **
      Peter Palfrader      | : :' :      The  universal
 http://www.palfrader.org/ | `. `'      Operating System
                           |   `-    http://www.debian.org/