docs/bib-ref2

diff stuff/letfreq @ 57:eb0815f21f04

added some auxiliary files: e.g. statistics
author markus schnalke <meillo@marmaro.de>
date Mon, 20 Oct 2014 07:09:57 +0200
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/stuff/letfreq	Mon Oct 20 07:09:57 2014 +0200
     1.3 @@ -0,0 +1,11 @@
     1.4 +#!/bin/sh
     1.5 +#
     1.6 +# print letter frequency
     1.7 +
     1.8 +cat "$@" | tbl | pic | nroff -ms -Tlocale 2>/dev/null |
     1.9 +        tr -cd 'A-Za-zÄÖÜäöüß'|tr A-ZÄÖÜ a-zäöü |
    1.10 +	sed 's,.,&\n,g'| sort |uniq -c | awk '
    1.11 +{sum+=$1; a[$2]=$1;}
    1.12 +END {for (x in a) {printf("%s\t%.2f\t%4d\n", x, a[x]/sum, a[x])} }
    1.13 +'| sort -nr -k 3
    1.14 +