docs/bib-ref2
view stuff/letfreq @ 61:0f2510fa7d98
Some more minor cleanups in the text.
Already done on 2014-11-05 and thus part of the PB publication.
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Fri, 21 Nov 2014 08:50:55 +0100 |
parents | |
children |
line source
1 #!/bin/sh
2 #
3 # print letter frequency
5 cat "$@" | tbl | pic | nroff -ms -Tlocale 2>/dev/null |
6 tr -cd 'A-Za-zÄÖÜäöüß'|tr A-ZÄÖÜ a-zäöü |
7 sed 's,.,&\n,g'| sort |uniq -c | awk '
8 {sum+=$1; a[$2]=$1;}
9 END {for (x in a) {printf("%s\t%.2f\t%4d\n", x, a[x]/sum, a[x])} }
10 '| sort -nr -k 3