FranzB
1
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
pludi
2
Keyboard layouts can be messy
perl -pi.bak -e 's/~/�/g;s/}/�/g;' hugo.dat
Will replace as needed and save a backup as hugo.dat.bak
FranzB
3
thks for your answer.... but ....
i do not want any backup !
FranzB
4
ok ok... now perfect
perl -pi -e 's/............'
is there a possibility to get a result, whether he found characters to replace or not??