i was wondering how many different teams and leagues in all the country definitions we have, so i wrote a small script to count them (counting the <team_name> tags in the files beginning with league_). it also counts the countries:
#!/bin/bash
teams=0
leagues=0
countries=0
for i in `find support_files/definitions -name 'country_*xml'`
do
countries=$[countries + 1]
done
for i in `find support_files/definitions/ -name 'league*xml'`
do
teams=$[teams + $(grep -c \<team_name\> $i)]
leagues=$[leagues + 1]
done
echo
echo "$teams teams in $leagues leagues in $countries countries."
actually i did it on the command line first, then i thought it might be nice to reuse it so i moved it into a script.