Article 5DS33 Escape characters in sed stream

Escape characters in sed stream

by
__John_L.
from LinuxQuestions.org on (#5DS33)
I'm trying to use sed on the linux command line, and am running into an issue with special characters.

I'd like to replace "~" with "E;" in the target file (without quotations). So far, using this command:

sed {s/\~/\&#7E\;/g}

on this data:

blah~blah

produces:

blah~#7E;blah

Close, but no cigar.

Thanks in advance for any insight you can provide.latest?d=yIl2AUoC8zA latest?i=A5hhj9K3eUU:kWohPbJypwQ:F7zBnMy latest?i=A5hhj9K3eUU:kWohPbJypwQ:V_sGLiP latest?d=qj6IDK7rITs latest?i=A5hhj9K3eUU:kWohPbJypwQ:gIN9vFwA5hhj9K3eUU
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments