Abhay_maniyar Abhay_maniyar - 1 year ago 68
Linux Question

How can I replace some characters with `'` character in a text file using sed?

this is the command I know

sed -i 's/&#39/'/g' output.txt
. As I figured out that the second
character is the cause of unexpected result here. Please tell me how to replace characters with a
in a text file. Thanks in advance.

Answer Source
sed -i 's/&#39/\'/g' output.txt

This will do the task. You need additional \

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download