1#!/bin/sh
2# Display a list of countries that have no coverage
3cat ../config/namebench.cfg | perl -ne 'chomp; if (/[0-9a-f]=.* (\w\w)$/) { print "$1\n"; }' | sort -u > /tmp/iso.has
4echo "Countries listed: `wc -l /tmp/iso.has`"
5cat ../data/ISO_31661-1.codes| perl -ne 'if (/ +(\w\w)$/) { print "$1\n"; }' > /tmp/iso.codes
6echo "Countries total: `wc -l /tmp/iso.codes`"
7cat /tmp/iso.has /tmp/iso.has /tmp/iso.codes | sort | uniq -u > /tmp/iso.missing
8cat /tmp/iso.missing | xargs -I{} -n1 grep " {}$" ../data/ISO_31661-1.codes
9echo "Countries missing: `wc -l /tmp/iso.missing`"