summaryrefslogtreecommitdiff
path: root/scripts/umlauts.sh
blob: 30b0dd58952ee295f18d37faaf2a45ce6cf9ac5b (plain)
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
#!/bin/zsh
# replace german umlauts and predefined character sequences
# with html-entities in a file given as parameter
# original script: 
# Michael Luthardt 2007
# http://dr-luthardt.de/

sed -i -e 's/\Ä/\Ä/g' \
    -i -e 's/\ä/\ä/g' \
    -i -e 's/\Ö/\Ö/g' \
    -i -e 's/\ö/\ö/g' \
    -i -e 's/\Ü/\Ü/g' \
    -i -e 's/\ü/\ü/g' \
    -i -e 's/\ß/\ß/g' \
    -i -e 's/\^-/\–/g' \
    -i -e 's/\^ /\ /g' \
    -i -e 's/\^</\&lt;/g' \
    -i -e 's/\^>/\&gt;/g' \
    -i -e 's/\^&/\&amp;/g' \
    -i -e 's/\^\^/\&#94;/g' \
    -i -e 's/\^x/\&times;/g' \
    -i -e 's/\^r/\&rarr;/g' \
    -i -e 's/\^b/\&bull;/g' \
    -i -e 's/\^e/\&#8644;/g' \
$1