ediman4902
Programmer
Is there a way in AWK to convert "ä" (umla-A) to "a" and for the rest of the European character set that use the "unla" like "O" and "U"?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
cat - <<eofx >MyFile.txt
1-àèìòù-
2-áéíóú-
3-àèìòù-
4-âêîôû-
5-ãëïõü-
6-äåæö
eofx
echo "+-- MyFile.txt --------------------"
cat MyFile.txt
echo "+------------------------------"
awk '
BEGIN {
c["a"]="àáâãäåæ";
c["e"]="èéêë";
c["i"]="ìíîï";
c["o"]="òóôõö";
c["u"]="ùúûü";}
{r=$0;
for (x in c) {
for (i=1;i<=length(c[x]);i++) {
gsub(substr(c[x],i,1),x,r)}
} print "+- %s"$0" to "r;
}' MyFile.txt