Page 1 of 1

number of teams, leagues and countries in current version

Posted: Mon Aug 15, 2005 9:54 am
by gyboth
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:

Code: Select all

#!/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.

the result was

Code: Select all

1232 teams in 87 league files in 15 countries.
gyözö

Re: number of teams, leagues and countries in current versio

Posted: Mon Aug 15, 2005 12:09 pm
by mom2pp
gyboth wrote:

Code: Select all

1232 teams in 87 league files in 15 countries.
wow!!! :shock:

thats loads

Posted: Tue Aug 16, 2005 1:42 am
by vector
well you can almost double that once the vic league is defined :)