Welcome to the Linux Foundation Forum!

Using escape characters with sed

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 "&#7E;" in the target file (without quotations). So far, using this command:

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

on this data:




Close, but no cigar. 

Thanks in advance for any insight you can provide.

Sign In or Register to comment.