X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fsam.git;a=blobdiff_plain;f=wordcount.sh;fp=wordcount.sh;h=0c63f10183efd7d9fdd1c0b0c5b3be5c5c425be5;hp=0000000000000000000000000000000000000000;hb=9fcf44a0c34f393689118e913a2d17d907036c85;hpb=d5e7e14d2ec624cfe0febcccd81e95082ef1c175 diff --git a/wordcount.sh b/wordcount.sh new file mode 100755 index 0000000..0c63f10 --- /dev/null +++ b/wordcount.sh @@ -0,0 +1,14 @@ +#!/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)" +