diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-06-16 12:29:24 +0200 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-06-16 12:29:24 +0200 |
commit | 88daad76761607c8f5e1fb0731bf53653175bbef (patch) | |
tree | 36641703e79b7625d2b7cfa58bdc2b9c92fb7501 /stats.sh | |
parent | 121897bca888944998c1260184a5ab4bdf4ccdad (diff) | |
download | tmwa-88daad76761607c8f5e1fb0731bf53653175bbef.tar.gz tmwa-88daad76761607c8f5e1fb0731bf53653175bbef.tar.bz2 tmwa-88daad76761607c8f5e1fb0731bf53653175bbef.tar.xz tmwa-88daad76761607c8f5e1fb0731bf53653175bbef.zip |
Added character statistics script by Platyna
Diffstat (limited to 'stats.sh')
-rwxr-xr-x | stats.sh | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/stats.sh b/stats.sh new file mode 100755 index 0000000..a50c499 --- /dev/null +++ b/stats.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +:> ~/public_html/stats/top-money.txt +(echo "TOP 50 RICHEST PLAYERS"; echo ""; cat tmwserver/save/athena.txt \ +| awk -F , '{sub(/^[0-9] */,"",$2);sub(/ *[0-9]$/,"",$2); sub(/ *[0-9]+$/,"",$6);print $6,$2}' \ +| sort -nr | head -n 50 | awk '{first=$1;$1="";print $0, "("first")"}' | nl -s ". "; echo ""; echo "Generated at `date`") >> ~/public_html/stats/top-money.txt + +:> ~/public_html/stats/top-highest-level.txt +(echo "TOP 50 HIGHEST LEVEL PLAYERS"; echo ""; cat tmwserver/save/athena.txt \ +| awk -F , '{sub(/^[0-9] */,"",$2);sub(/ *[0-9]$/,"",$2); print $3,$2}' \ +| sort -nr | head -n 50 | awk '{first=$1;$1="";print $0, "("first")"}' | nl -s ". "; echo ""; echo "Generated at `date`") >> ~/public_html/stats/top-highest-level.txt + +:> ~/public_html/stats/top-highest-str.txt +(echo "TOP 50 HIGHEST LEVEL PLAYERS"; echo ""; cat tmwserver/save/athena.txt \ +| awk -F , '{sub(/^[0-9] */,"",$2);sub(/ *[0-9]$/,"",$2); sub(/^[0-9]+[[:space:]]*/,"",$9);print $9,$2}' \ +| sort -nr | head -n 50 | awk '{first=$1;$1="";print $0, "("first")"}' | nl -s ". "; echo ""; echo "Generated at `date`") >> ~/public_html/stats/top-highest-str.txt + +:> ~/public_html/stats/top-highest-agi.txt +(echo "TOP 50 HIGHEST LEVEL PLAYERS"; echo ""; cat tmwserver/save/athena.txt \ +| awk -F , '{sub(/^[0-9] */,"",$2);sub(/ *[0-9]$/,"",$2); print $10,$2}' \ +| sort -nr | head -n 50 | awk '{first=$1;$1="";print $0, "("first")"}' | nl -s ". "; echo ""; echo "Generated at `date`") >> ~/public_html/stats/top-highest-agi.txt + +:> ~/public_html/stats/top-highest-vit.txt +(echo "TOP 50 HIGHEST LEVEL PLAYERS"; echo ""; cat tmwserver/save/athena.txt \ +| awk -F , '{sub(/^[0-9] */,"",$2);sub(/ *[0-9]$/,"",$2); print $11,$2}' \ +| sort -nr | head -n 50 | awk '{first=$1;$1="";print $0, "("first")"}' | nl -s ". "; echo ""; echo "Generated at `date`") >> ~/public_html/stats/top-highest-vit.txt + +:> ~/public_html/stats/top-highest-int.txt +(echo "TOP 50 HIGHEST LEVEL PLAYERS"; echo ""; cat tmwserver/save/athena.txt \ +| awk -F , '{sub(/^[0-9] */,"",$2);sub(/ *[0-9]$/,"",$2); print $12,$2}' \ +| sort -nr | head -n 50 | awk '{first=$1;$1="";print $0, "("first")"}' | nl -s ". "; echo ""; echo "Generated at `date`") >> ~/public_html/stats/top-highest-int.txt + +:> ~/public_html/stats/top-highest-dex.txt +(echo "TOP 50 HIGHEST LEVEL PLAYERS"; echo ""; cat tmwserver/save/athena.txt \ +| awk -F , '{sub(/^[0-9] */,"",$2);sub(/ *[0-9]$/,"",$2); print $13,$2}' \ +| sort -nr | head -n 50 | awk '{first=$1;$1="";print $0, "("first")"}' | nl -s ". "; echo ""; echo "Generated at `date`") >> ~/public_html/stats/top-highest-dex.txt + +:> ~/public_html/stats/top-highest-luk.txt +(echo "TOP 50 HIGHEST LEVEL PLAYERS"; echo ""; cat tmwserver/save/athena.txt \ +| awk -F , '{sub(/^[0-9] */,"",$2);sub(/ *[0-9]$/,"",$2); sub(/[[:space:]]*[0-9]+$/,"",$14);print $14,$2}' \ +| sort -nr | head -n 50 | awk '{first=$1;$1="";print $0, "("first")"}' | nl -s ". "; echo ""; echo "Generated at `date`") >> ~/public_html/stats/top-highest-luk.txt |