#!/bin/sh
echo "" > /tmp/tmp

get_fetch() {
  http_proxy="$1:$2"
  export http_proxy
  test=`fetch -T 10 -o /dev/null http://www.planet.nl 2>&1`
  if [ $? = 0 ]; then
    echo "`echo "$test" |grep kBps | \
    sed 's/^.*(//' | awk '{print $1}'` $1" >> /tmp/tmp
  fi
}

get_fetch proxy1.wleiden.net 3128
get_fetch proxy2.wleiden.net 3128
get_fetch proxy3.wleiden.net 3128

sort -nr /tmp/tmp

