-
Notifications
You must be signed in to change notification settings - Fork 25
/
sed-char-to-html-entity-name
executable file
·15 lines (14 loc) · 2.13 KB
/
sed-char-to-html-entity-name
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
#
# sed script to change all non-HTML characters to their HTML entity names.
#
# For example, if the text has the Greek letter Alpha, this script emits "Α"
#
# Version: 1.1.0
# Created: 2012-04-01
# Updated: 2015-01-25
# License: GPL
# Contact: Joel Parker Henderson ([email protected])
##
set -euf
sed 's/ƒ/ƒ/g;s/Α/Α/g;s/Β/Β/g;s/Γ/Γ/g;s/Δ/Δ/g;s/Ε/Ε/g;s/Ζ/Ζ/g;s/Η/Η/g;s/Θ/Θ/g;s/Ι/Ι/g;s/Κ/Κ/g;s/Λ/Λ/g;s/Μ/Μ/g;s/Ν/Ν/g;s/Ξ/Ξ/g;s/Ο/Ο/g;s/Π/Π/g;s/Ρ/Ρ/g;s/Σ/Σ/g;s/Τ/Τ/g;s/Υ/Υ/g;s/Φ/Φ/g;s/Χ/Χ/g;s/Ψ/Ψ/g;s/Ω/Ω/g;s/α/α/g;s/β/β/g;s/γ/γ/g;s/δ/δ/g;s/ε/ε/g;s/ζ/ζ/g;s/η/η/g;s/θ/θ/g;s/ι/ι/g;s/κ/κ/g;s/λ/λ/g;s/μ/μ/g;s/ν/ν/g;s/ξ/ξ/g;s/ο/ο/g;s/π/π/g;s/ρ/ρ/g;s/ς/ς/g;s/σ/σ/g;s/τ/τ/g;s/υ/υ/g;s/φ/φ/g;s/χ/χ/g;s/ψ/ψ/g;s/ω/ω/g;s/ϑ/ϑ/g;s/ϒ/ϒ/g;s/ϖ/ϖ/g;s/•/•/g;s/…/…/g;s/′/′/g;s/″/″/g;s/‾/‾/g;s/⁄/⁄/g;s/℘/℘/g;s/ℑ/ℑ/g;s/ℜ/ℜ/g;s/™/™/g;s/ℵ/ℵ/g;s/←/←/g;s/↑/↑/g;s/→/→/g;s/↓/↓/g;s/↔/↔/g;s/↵/↵/g;s/⇐/⇐/g;s/⇑/⇑/g;s/⇒/⇒/g;s/⇓/⇓/g;s/⇔/⇔/g;s/∀/∀/g;s/∂/∂/g;s/∃/∃/g;s/∅/∅/g;s/∇/∇/g;s/∈/∈/g;s/∉/∉/g;s/∋/∋/g;s/∏/∏/g;s/∑/∑/g;s/−/−/g;s/∗/∗/g;s/√/√/g;s/∝/∝/g;s/∞/∞/g;s/∠/∠/g;s/∧/∧/g;s/∨/∨/g;s/∩/∩/g;s/∪/∪/g;s/∫/∫/g;s/∴/∴/g;s/∼/∼/g;s/≅/≅/g;s/≈/≈/g;s/≠/≠/g;s/≡/≡/g;s/≤/≤/g;s/≥/≥/g;s/⊂/⊂/g;s/⊃/⊃/g;s/⊄/⊄/g;s/⊆/⊆/g;s/⊇/⊇/g;s/⊕/⊕/g;s/⊗/⊗/g;s/⊥/⊥/g;s/⋅/⋅/g;s/⌈/⌈/g;s/⌉/⌉/g;s/⌊/⌊/g;s/⌋/⌋/g;s/〈/⟨/g;s/〉/⟩/g;s/◊/◊/g;s/♠/♠/g;s/♣/♣/g;s/♥/♥/g;s/♦/♦/g;'