nsbin/ae_parser-2004-02-24
Nico Schottelius d3c6e29902 Initial commit
2006-07-20 09:54:37 +02:00

56 lines
1.2 KiB
Text
Executable file

# Date: 15th of March 2k+1
# Last Changed: 11th of January 2k+4
# Author: Nico Schottelius <Nico AT Schottelius DOT Org>
# Description: This script searches for the following strings
# and will substitute them with the right German Characters
#
# _ae_ = ä
# _ue_ = ü
# _oe_ = ö
# _Ae_ = Ä
# _Oe_ = Ö
# _Ue_ = Ü
# _ss_ = ß
#
if [ $# -lt 1 ]; then
echo `basename $0`': file(s)'
echo 'Hey, hey guy, what to convert ?'
exit 1
fi
for mfile in $@; do
if [ ! -f "$mfile" ]; then
echo "Keine Datei namens $mfile gefunden. Skip."
break
fi
cp -f "$mfile" "$mfile".ae_parser-orig
# something other programs do not use
G_STR=".`date +%s%M%U`-`basename $0`-`basename $mfile`-$$"
cat $mfile | sed 's/_ae_/ä/g' > $G_STR
mv $G_STR $mfile
cat $mfile | sed 's/_ue_/ü/g' > $G_STR
mv $G_STR $mfile
cat $mfile | sed 's/_oe_/ö/g' > $G_STR
mv $G_STR $mfile
cat $mfile | sed 's/_Ae_/Ä/g' > $G_STR
mv $G_STR $mfile
cat $mfile | sed 's/_Ue_/Ü/g' > $G_STR
mv $G_STR $mfile
cat $mfile | sed 's/_Oe_/Ö/g' > $G_STR
mv $G_STR $mfile
cat $mfile | sed 's/_ss_/ß/g' > $G_STR
mv $G_STR $mfile
done