docs/bib-ref2

view stuff/wordfreq @ 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 source
1 #!/bin/sh
2 #
3 # print word frequency
5 deroff "$@" |
6 tr -c 'A-Za-zÄÖÜäöüß-' '\n' | tr A-ZÄÖÜ a-zäöü |
7 sed '/^ *$/d'| 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