1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
#!/bin/sh
#
# Check that known typos are not found in dictionary
#
# (c) 2019-2023 Roland Rosenfeld <roland@debian.org>
# case sensitive:
TYPOS="Aour seperation Gie0erei Behalter äußester changable Pirmarschule Stehgreif Verländerungsschnüre vornehemn Mannschaftskolleging iBuchen"
# case insensitive:
TYPOSi="managment"
# Dictionary to test:
DICT=/usr/share/trans/de-en
FOUND=""
for i in $TYPOS "none tumor"
do
if grep -q "$i" "$DICT"
then
FOUND="$i $FOUND"
fi
done
for i in $TYPOSi
do
if grep -qi "$i" "$DICT"
then
FOUND="$i $FOUND"
fi
done
if [ -z "$FOUND" ]
then
exit 0
else
echo "Found following typos in $DICT:"
echo "$FOUND"
exit 1
fi
|