-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrac_bib.sh
95 lines (73 loc) · 2.09 KB
/
rac_bib.sh
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/bin/bash
####################################################################
### Letters converted by the script (both lower and upper cases) ###
####################################################################
# á à â ä
# é è ê ë
# í ì î ï
# ó ò ô ö
# ú ù û ü
# ý ỳ ŷ ÿ
# ç
# ñ
#######################
### Convert letters ###
#######################
### Acute accent ###
sed -i -e "s/á/{\\\'a}/g" $1
sed -i -e "s/é/{\\\'e}/g" $1
sed -i -e "s/í/{\\\'i}/g" $1
sed -i -e "s/ó/{\\\'o}/g" $1
sed -i -e "s/ú/{\\\'u}/g" $1
sed -i -e "s/ý/{\\\'y}/g" $1
sed -i -e "s/Á/{\\\'A}/g" $1
sed -i -e "s/É/{\\\'E}/g" $1
sed -i -e "s/Í/{\\\'I}/g" $1
sed -i -e "s/Ó/{\\\'O}/g" $1
sed -i -e "s/Ú/{\\\'U}/g" $1
sed -i -e "s/Ý/{\\\'Y}/g" $1
### Grave accent ###
sed -i -e "s/à/{\\\\\`a}/g" $1
sed -i -e "s/è/{\\\\\`e}/g" $1
sed -i -e "s/ì/{\\\\\`i}/g" $1
sed -i -e "s/ò/{\\\\\`o}/g" $1
sed -i -e "s/ù/{\\\\\`u}/g" $1
sed -i -e "s/ỳ/{\\\\\`y}/g" $1
sed -i -e "s/À/{\\\\\`A}/g" $1
sed -i -e "s/È/{\\\\\`E}/g" $1
sed -i -e "s/Ì/{\\\\\`I}/g" $1
sed -i -e "s/Ò/{\\\\\`O}/g" $1
sed -i -e "s/Ù/{\\\\\`U}/g" $1
sed -i -e "s/Ỳ/{\\\\\`Y}/g" $1
### Circumflex ###
sed -i -e "s/â/{\\\^a}/g" $1
sed -i -e "s/ê/{\\\^e}/g" $1
sed -i -e "s/î/{\\\^i}/g" $1
sed -i -e "s/ô/{\\\^o}/g" $1
sed -i -e "s/û/{\\\^u}/g" $1
sed -i -e "s/ŷ/{\\\^y}/g" $1
sed -i -e "s/Â/{\\\^A}/g" $1
sed -i -e "s/Ê/{\\\^E}/g" $1
sed -i -e "s/Î/{\\\^I}/g" $1
sed -i -e "s/Ô/{\\\^O}/g" $1
sed -i -e "s/Û/{\\\^U}/g" $1
sed -i -e "s/Ŷ/{\\\^Y}/g" $1
### Trema ###
sed -i -e "s/ä/{\\\\\"a}/g" $1
sed -i -e "s/ë/{\\\\\"e}/g" $1
sed -i -e "s/ï/{\\\\\"i}/g" $1
sed -i -e "s/ö/{\\\\\"o}/g" $1
sed -i -e "s/ü/{\\\\\"u}/g" $1
sed -i -e "s/ÿ/{\\\\\"y}/g" $1
sed -i -e "s/Ä/{\\\\\"A}/g" $1
sed -i -e "s/Ë/{\\\\\"E}/g" $1
sed -i -e "s/Ï/{\\\\\"I}/g" $1
sed -i -e "s/Ö/{\\\\\"O}/g" $1
sed -i -e "s/Ü/{\\\\\"U}/g" $1
sed -i -e "s/Ÿ/{\\\\\"Y}/g" $1
### Cedilla ###
sed -i -e "s/ç/{\\\c\ c}/g" $1
sed -i -e "s/Ç/{\\\c\ C}/g" $1
### Tilde ###
sed -i -e "s/ñ/{\\\~n}/g" $1
sed -i -e "s/Ñ/{\\\~N}/g" $1