Skip to content

Instantly share code, notes, and snippets.

View dwnoble's full-sized avatar

Dan Noble dwnoble

View GitHub Profile
@dwnoble
dwnoble / replace_accented_characters.sh
Created February 23, 2012 19:05
Replace characters that have Spanish accents with non accented 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'