blob: 92e979d4c307cd0a37dbaff348451685df6be801 (
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
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
|
#!/bin/bash
# This style is sometimes known as open-face or blackboard-bold. Double-struck symbols already encoded in the Letterlike Symbols block are omitted here to avoid duplicate encoding. Considerable variation in font style is acceptable, as long as the glyphs retain the visual element of doubled strokes.
declare -A ds=(
[A]=𝔸
[B]=𝔹
[C]=ℂ
[D]=𝔻
[E]=𝔼
[F]=𝔽
[G]=𝔾
[H]=ℍ
[I]=𝕀
[J]=𝕁
[K]=𝕂
[L]=𝕃
[M]=𝕄
[N]=ℕ
[O]=𝕆
[P]=ℙ
[Q]=ℚ
[R]=ℝ
[S]=𝕊
[T]=𝕋
[U]=𝕌
[V]=𝕍
[W]=𝕎
[X]=𝕏
[Y]=𝕐
[Z]=ℤ
[a]=𝕒
[b]=𝕓
[c]=𝕔
[d]=𝕕
[e]=𝕖
[f]=𝕗
[g]=𝕘
[h]=𝕙
[i]=𝕚
[j]=𝕛
[k]=𝕜
[l]=𝕝
[m]=𝕞
[n]=𝕟
[o]=𝕠
[p]=𝕡
[q]=𝕢
[r]=𝕣
[s]=𝕤
[t]=𝕥
[u]=𝕦
[v]=𝕧
[w]=𝕨
[x]=𝕩
[y]=𝕪
[z]=𝕫
[0]=𝟘
[1]=𝟙
[2]=𝟚
[3]=𝟛
[4]=𝟜
[5]=𝟝
[6]=𝟞
[7]=𝟟
[8]=𝟠
[9]=𝟡
)
while IFS= read -r line
do
replacement=""
for i in $(seq 0 "$((${#line}-1))")
do
c1=${line:$i:1}
if [[ $c1 =~ [0-9a-zA-Z] ]]
then replacement+=${ds[$c1]}
else replacement+=$c1
fi
done
echo "$replacement"
done
|