Created
February 23, 2012 19:05
-
-
Save dwnoble/1894405 to your computer and use it in GitHub Desktop.
Replace characters that have Spanish accents with non accented characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Note: input should end with a newline | |
LINES='' | |
while read LINE; do | |
LINES="${LINES}\n${LINE}" | |
done | |
echo $LINES | sed 's/á/a/g' | sed 's/Á/A/g' | sed 's/é/e/g' | sed 's/É/E/g' | sed 's/í/i/g' | sed 's/Í/I/g' | sed 's/ó/o/g' | sed 's/Ó/O/g' | sed 's/ú/u/g' | sed 's/Ú/U/g' | sed 's/ñ/n/g' | sed 's/Ñ/N/g' | sed 's/ü/u/g' | sed 's/Ü/U/g' | |
exit 0 |
Or:
sed -e "s/\./ /g; . . . ;s/-/ /g;s/)//g"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why not:
and so on?