summaryrefslogtreecommitdiff
path: root/marriage-info.sh
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2009-06-21 16:02:50 +0200
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2009-06-21 16:02:50 +0200
commit2da65e62517ef76f686050c2891b604735a99c33 (patch)
tree08714d26e74f17759498d4e45216d4cc4133ade4 /marriage-info.sh
parent4284644f2795215f8401653ced42ac61e508fae1 (diff)
downloadtmwa-2da65e62517ef76f686050c2891b604735a99c33.tar.gz
tmwa-2da65e62517ef76f686050c2891b604735a99c33.tar.bz2
tmwa-2da65e62517ef76f686050c2891b604735a99c33.tar.xz
tmwa-2da65e62517ef76f686050c2891b604735a99c33.zip
Added the marriage-info scripts by Fate
Mantis-issue: 458
Diffstat (limited to 'marriage-info.sh')
-rwxr-xr-xmarriage-info.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/marriage-info.sh b/marriage-info.sh
new file mode 100755
index 0000000..2389d7f
--- /dev/null
+++ b/marriage-info.sh
@@ -0,0 +1,20 @@
+#! /bin/sh
+
+cd ~/tmwserver
+
+cat save/athena.txt | sort -n > athena-sorted.txt
+
+printf "Top married couples\n===================\n" > ~/public_html/stats/married.txt
+cat athena-sorted.txt | ./marriage-info -c | sort -rn | awk '{printf "%d %s oo %s (%s (%s, %d), %s(%s, %d))\n", ++rank, $3, $6, $3, $4, $5, $6, $7, $8}' | tr '%' ' ' >> ~/public_html/stats/married.txt
+
+printf "Top female singles\n==================\n" > ~/public_html/stats/female-singles.txt
+cat athena-sorted.txt | ./marriage-info -f | sort -rn | awk '{printf "%d %s(%d)\n", ++rank, $3, $1}' | tr '%' ' ' | head -50 >> ~/public_html/stats/female-singles.txt
+
+printf "Top male singles\n===============\n" > ~/public_html/stats/male-singles.txt
+cat athena-sorted.txt | ./marriage-info -m | sort -rn | awk '{printf "%d %s(%d)\n", ++rank, $3, $1}' | tr '%' ' ' | head -50 >> ~/public_html/stats/male-singles.txt
+
+printf "Top singles\n===============\n" > ~/public_html/stats/singles.txt
+cat athena-sorted.txt | ./marriage-info -s | sort -rn | awk '{printf "%d %s(%s, %d)\n", ++rank, $3, $4, $1}' | tr '%' ' ' | head -50 >> ~/public_html/stats/singles.txt
+
+rm athena-sorted.txt
+