number of teams, leagues and countries in current version

Forum devoted to country/league/cup/team definition topics. You can also get help here if you have trouble writing or using a definition.
Post Reply
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

number of teams, leagues and countries in current version

Post 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ö
Press any key to continue or any other key to quit.
mom2pp
Posts: 193
Joined: Sat Jan 29, 2005 5:47 pm
Location: Scotland

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

Post by mom2pp »

gyboth wrote:

Code: Select all

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

thats loads
Haven't u people ever heard of closing a goddam door?
vector
Posts: 449
Joined: Sat Dec 18, 2004 11:26 pm
Location: Australia, Victoria

Post by vector »

well you can almost double that once the vic league is defined :)
"There are two ways to score. Dribble it over the line or smash it into the back of the net."
What type are you?
Post Reply