I am trying to write a small sed script to change tex coding \'a to
just á, since it is much simpler to write it like that, using latin1
etc. But it is not working. I wonder if someone can point the right
way, or may be someone has a piece of code that would do the work for
all tex \ss, \"u and so forth I imagine many of the non-english tex
users at some point have done that before.

Here goes the piece of code that I am trying to write:
(sorry for the long line, but I am not sure how sed would look at the
filling of lines done by emacs, probably would not like it)

**********  code   *********

#!/bin/bash
#Trying with sed:
#To change \'a into á and so forth
echo "File name to process please:"
read archivo
cp $archivo $archivo-copia
 
sed -e 's/\\'a/á/g' -e 's/\\'e/é/g' -e 's/\\'{\\i}/í/g' -e 's/\\'o/ó/g' -e 
's/\\'u/ú/g' -e 's/\\'A/Á/g' -e 's/\\'E/É/g' -e 's/\\'{\\I}/Í/g' -e 's/\\'O/Ó/g' -e 
's/\\'U/Ú/g' -e 's/\\~n/ñ/g' -e 's/\\~N/Ñ/g' -e 's/\\"u/ü/g' -e 's/\\"U/Ü/g' -e 
's/?`/¿/g' -e 's/!`/¡/g' $archivo-copia > $archivo-out
 
rm $archivo-copia
exit 0

********  end of code   *******************


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to