Translating/Replacing characters in a file

Hi,

i have a given file named hugo.dat. In this file there are several lines that contain characters like } and ~

Now, i need a script that replaces the character } to �
and character ~ to �

Can anyone help for a working ksh script?

Kind Regards
FranzB

Keyboard layouts can be messy :wink:

perl -pi.bak -e 's/~/�/g;s/}/�/g;' hugo.dat

Will replace as needed and save a backup as hugo.dat.bak

thks for your answer.... but ....
i do not want any backup !

ok ok... now perfect
perl -pi -e 's/............'

is there a possibility to get a result, whether he found characters to replace or not??