#! /bin/sh map=true script=LATIN while case "$1" in -c) # count only map=false shift;; -s) # script script=`echo $2 | tr 'a-z' 'A-Z'` shift shift;; -stat) for script in arabic cyrillic greek hebrew latin do SCRIPTtag=`echo $script | tr 'a-z' 'A-Z'` sed -e "s, AND$,," UniWITH | sed -e "s,.* $SCRIPTtag .*WITH \(.*\),\1," -e t -e d | sort | uniq > uwith.$script-accents ./mnemos.determine -c -s $script uwith.$script-accents | sort -nr > uwith.$script-accents.n done rm -f uwith.all-accents cat uwith.*-accents | sort | uniq > uwith.all-accents exit;; *) false;; esac do true done sed -e "s, .*,," $* | while read a do if $map then echo -------------------------------------------------------------- echo $a egrep "$script .* WITH $a;" UnicodeData.txt | wc -l tmp=/tmp/mnemos.$$ egrep "$script .* WITH $a \*/" mnemos.??? > $tmp wc -l < $tmp sed -e "s,.*\(0x[0-9a-fA-F]*\).*,\1," $tmp | tr 'a-f' 'A-F' | sort | uniq -d cat $tmp rm -f $tmp else # count only echo `egrep "$script .* WITH $a;" UnicodeData.txt | wc -l`" $a" fi done