#!/bin/bash
#
# Copyright (C) SwaJime's Cove, 2009
# http://www.swajime.com/
#
UN_ACCENT=$(for L in {a..z};do echo 's/['$(unum.pl n='small.*letter '$L' |small.*letter '$L'$'|awk -F\\\" '{ printf $2 }')']/'$L'/g;';done;
    for L in {A..Z};do echo 's/['$(unum.pl n='letter '$L' |letter '$L'$'|grep -v 'SMALL'|awk -F\\\" '{ printf $2 }')']/'$L'/g;';done)
U_GREEK=$(for (( x=0x0391; x<=0x03A9; x++)); do n=$(/usr/bin/printf "%0.4x" $x); /usr/bin/printf "\u$n"; done)
L_GREEK=$(for (( x=0x03B1; x<=0x03C9; x++)); do n=$(/usr/bin/printf "%0.4x" $x); /usr/bin/printf "\u$n"; done)
TO_GREEK='y/'$U_GREEK'/ABGDEZE_IKLMNXOPR_STYFK_O/;y/'$L_GREEK'/abgdeze_iklmnxoprsstyfk_o/'
#
echo -n ${UN_ACCENT}${TO_GREEK}
#
#EOF