[TriLUG] Change string with special character

Thomas thomasvt at gmail.com
Fri May 18 11:10:46 EDT 2007


Hello,

I need to change a string in a file

\303\215 (all characters) with Í (LATIN CAPITAL LETTER I WITH ACUTE
ie: echo '\0315')


I cannot get it to work using the commands below.

$ echo '\303\215' | tr '\303\215' `echo '\0315'`
does not translate the whole string

$ echo '\303\215'| sed s/'\\303\\215'/`echo '\0315'`/g
sed: command garbled: s/\\303\\215/Í

Any suggestions/help is welcome.

Thanks,
Thomas



More information about the TriLUG mailing list