^ C character after copying and pasting text from Photoshop

Our designers provide HTML for our email marketing, and often I see the ^ C symbol in it when viewed in vi . They are invisible in textmate.

It looks something like this.

<td width="340" align="center">Odyssey T-shirt / ^C<br>&pound;000</td>

I want to write a sed script that finds and replaces them, but how can I find this?

+4
source share
1 answer

You can replace all occurrences in a file using:

cat YOURFILE.html | sed 's/^C/YOURSTRING/g'

To enter ^ C, press Ctrl-V and then Ctrl-C. Replace YOURSTRING with the line you want to replace, and YOURFILE with the file name.

+1
source

All Articles