1
0
mirror of https://github.com/balkian/dotfiles.git synced 2024-12-04 09:12:27 +00:00
dotfiles/scripts/.bin/replace-accented.sh
J. Fernando Sánchez fc8c11d360 New config
2015-09-18 02:14:17 +02:00

11 lines
353 B
Bash
Executable File

#!/bin/sh
# Note: input should end with a newline
LINES=''
while read LINE; do
echo $LINE | 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'
done
exit 0