summaryrefslogtreecommitdiff
path: root/rank-mirrors.sh
blob: ae9cf7dde1636571aec9f3f8d64eebceaa740008 (plain) (blame)
1
2
3
4
5
6
7
8
9
#!/bin/sh
# https://adufray.com/blog/2016/10/24/finding-the-fastest-freebsd-mirror

for i in {1..15}; do
	echo -n "ftp${i}.us.freebsd.org: ";
	curl -o /dev/null -m 30 ftp://ftp${i}.us.freebsd.org/pub/FreeBSD/development/CVS-archive/projcvs-projects-archive.tar.gz 2>&1 | \
		tail -1 | \
		egrep -o '[^[:cntrl:]]+$';
done