docs/bib-ref2
annotate stuff/letfreq @ 59:9b01685b5ee2
applied language and formating requests by PersBib
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Sun, 26 Oct 2014 10:34:33 +0100 |
parents | |
children |
rev | line source |
---|---|
meillo@57 | 1 #!/bin/sh |
meillo@57 | 2 # |
meillo@57 | 3 # print letter frequency |
meillo@57 | 4 |
meillo@57 | 5 cat "$@" | tbl | pic | nroff -ms -Tlocale 2>/dev/null | |
meillo@57 | 6 tr -cd 'A-Za-zÄÖÜäöüß'|tr A-ZÄÖÜ a-zäöü | |
meillo@57 | 7 sed 's,.,&\n,g'| sort |uniq -c | awk ' |
meillo@57 | 8 {sum+=$1; a[$2]=$1;} |
meillo@57 | 9 END {for (x in a) {printf("%s\t%.2f\t%4d\n", x, a[x]/sum, a[x])} } |
meillo@57 | 10 '| sort -nr -k 3 |
meillo@57 | 11 |