diff options
author | MadCamel <madcamel@gmail.com> | 2010-05-05 07:34:05 -0400 |
---|---|---|
committer | MadCamel <madcamel@gmail.com> | 2010-05-05 07:34:05 -0400 |
commit | 51e87379c9d532cafc98b96178709b8b8c88e1ae (patch) | |
tree | db80f2e1a758b2739ab79218a88a3def501f362d /src/tool/stats.sh | |
parent | ae73f3122063048b3a5a2d1c48f6c13b02fd4e1f (diff) | |
download | tmwa-51e87379c9d532cafc98b96178709b8b8c88e1ae.tar.gz tmwa-51e87379c9d532cafc98b96178709b8b8c88e1ae.tar.bz2 tmwa-51e87379c9d532cafc98b96178709b8b8c88e1ae.tar.xz tmwa-51e87379c9d532cafc98b96178709b8b8c88e1ae.zip |
Fixed up and slightly simplified the build system
It's now possible to run 'make' in any of the src/ subdirs and
have it build properly. Moved some tools including eathena-monitor
to src/tools - run 'make tools' to build. CFLAGS, etc are now in
the 'make.defs' file. Requires GNU make.
Diffstat (limited to 'src/tool/stats.sh')
-rwxr-xr-x | src/tool/stats.sh | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/tool/stats.sh b/src/tool/stats.sh new file mode 100755 index 0000000..9ea021b --- /dev/null +++ b/src/tool/stats.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +ATHENATXT="save/athena.txt" +DEST="$HOME/public_html/stats" + +:> ${DEST}/top-money.txt +(echo "TOP 50 RICHEST PLAYERS"; echo ""; cat ${ATHENATXT} \ +| 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`") >> ${DEST}/top-money.txt + +:> ${DEST}/top-highest-level.txt +(echo "TOP 50 HIGHEST LEVEL PLAYERS"; echo ""; cat ${ATHENATXT} \ +| 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`") >> ${DEST}/top-highest-level.txt + +:> ${DEST}/top-highest-str.txt +(echo "TOP 50 HIGHEST LEVEL PLAYERS"; echo ""; cat ${ATHENATXT} \ +| 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`") >> ${DEST}/top-highest-str.txt + +:> ${DEST}/top-highest-agi.txt +(echo "TOP 50 HIGHEST LEVEL PLAYERS"; echo ""; cat ${ATHENATXT} \ +| 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`") >> ${DEST}/top-highest-agi.txt + +:> ${DEST}/top-highest-vit.txt +(echo "TOP 50 HIGHEST LEVEL PLAYERS"; echo ""; cat ${ATHENATXT} \ +| 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`") >> ${DEST}/top-highest-vit.txt + +:> ${DEST}/top-highest-int.txt +(echo "TOP 50 HIGHEST LEVEL PLAYERS"; echo ""; cat ${ATHENATXT} \ +| 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`") >> ${DEST}/top-highest-int.txt + +:> ${DEST}/top-highest-dex.txt +(echo "TOP 50 HIGHEST LEVEL PLAYERS"; echo ""; cat ${ATHENATXT} \ +| 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`") >> ${DEST}/top-highest-dex.txt + +:> ${DEST}/top-highest-luk.txt +(echo "TOP 50 HIGHEST LEVEL PLAYERS"; echo ""; cat ${ATHENATXT} \ +| 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`") >> ${DEST}/top-highest-luk.txt |