--- /dev/null
+#!/bin/bash
+# Count words in thesis
+
+function doThing {
+ for i in $1/*.tex; do
+ echo -e "$2/$(basename $i) : $(detex $i | wc -w)"
+ if [ -e ${i%.*} ]; then
+ doThing ${i%.*} ${i%.*}
+ fi
+ done
+}
+doThing chapters chapters
+echo "Total : $(detex thesis.tex | wc -w)"
+