wenigstens die griechischen Buchstaben sollten gehen

This commit is contained in:
pascal 2008-08-12 11:13:24 +00:00
parent 494f73e6ef
commit a506fec224
1 changed files with 64 additions and 22 deletions

View File

@ -2,7 +2,9 @@
# Verzeichnis muss eventuell an den Ort der Compose angepasst werden:
COMPOSE=/usr/share/X11/locale/en_US.UTF-8/Compose
KEYSYM=/usr/include/X11/keysymdef.h
n=10
typeset -i j=0
while [ ! "$beschreibung" ]
do
@ -32,12 +34,53 @@ done
anzahl=`grep -iw $beschreibung $COMPOSE | head -$n | wc -l`
if [ $anzahl -gt 0 ]
then
ausgabe=1
for i in $(seq 1 $anzahl)
do
a[$i]=`grep -iw $beschreibung $COMPOSE | grep ^\< | head -$i | tail -1 | cut -f2 -d \"`
echo $i\) ${a[$i]}
j=j+1
a[$j]=`grep -iw $beschreibung $COMPOSE | grep ^\< | head -$i | tail -1 | cut -f2 -d \"`
echo $j\) ${a[$j]}
done
fi
anzahl2=`grep -i [\ _]$beschreibung[\ _] $KEYSYM | head -$n | wc -l`
if [ $anzahl2 -gt 0 ]
then
ausgabe=1
for i in $(seq 1 $anzahl2)
do
c=`grep -i [\ _]$beschreibung[\ _] $KEYSYM | grep ^#define | head -$i | tail -1 | cut -f2- -d\* | cut -f2- -d+ | cut -f1 -d\ `
c1=`echo $c | cut -c1-2`
c2=`echo $c | cut -c3`
c3=`echo $c | cut -c4`
case $c1 in
00)
j=j+1
a[$j]=`echo -e \\\x${c2}`
echo $j\) ${a[$j]}
;;
03)
if [ "$c2" = "C" ]
then
j=j+1
a[$j]=`echo -e \\\xcf\\\x8${c3}`
echo $j\) ${a[$j]}
else
j=j+1
a[$j]=`echo -e \\\xce\\\x${c2}${c3}`
echo $j\) ${a[$j]}
fi
;;
*)
;;
esac
done
fi
if [ $ausgabe ]
then
read -p 'welches Zeichen suchen Sie: ' zahl
echo
else
@ -47,6 +90,5 @@ fi
if [ ${a[$zahl]} ]
then
echo
./wiemitneo ${a[$zahl]}
fi