Skip to content

Instantly share code, notes, and snippets.

@syranez
Created August 29, 2011 21:11
Show Gist options
  • Save syranez/1179422 to your computer and use it in GitHub Desktop.
Save syranez/1179422 to your computer and use it in GitHub Desktop.
Anzahl der Einträge pro Spieler der Highscoreliste von crawl.christoph-d.de berechnen
#!/bin/bash
PLAYERS="syranez MrN Christoph Plasmo godot";
declare -A ranking;
for name in $PLAYERS
do
c=0;
c=`wget 'http://crawl.christoph-d.de/scores.txt' -q -O - | grep "name=$name" -c`
ranking["$name"]="$c";
done;
for player in "${!ranking[@]}"
do
echo $player": "${ranking["$player"]}
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment