Hi all .... vexing problem here ...
I am using sed to replace some special characters in a .txt file:
sed -e 's/_<ED>_/_355_/g;s/_<F3>_/_363_/g;s/_<E1>_/_341_/g' filename.txt
This command replaces <ED> with � , <F3> with � and <E1> with �.
When I run the command to standard output, it works as expected.
When I attempt to write to another file, the special characters are eliminated again.
so
sed -e 's/_<ED>_/_355_/g;s/_<F3>_/_363_/g;s/_<E1>_/_341_/g' filename.txt
works, but
sed -e 's/_<ED>_/_355_/g;s/_<F3>_/_363_/g;s/_<E1>_/_341_/g' filename.txt>filename2.txt
does not.
any help is appreciated.