Replace a double backslash followed by quote (\’) using sed?

I am unable to replace double backslash followed by quote ' in sed. This is my current command

echo file.txt | sed "s:\':':g"

The above command not only replaces ' with ' it also replaces ' with '

How could I just replace exact match?

Input:

'one', 'two 'change', 'three 'unchanged'

Expected:

'one', 'two 'change', 'three 'unchanged'

Actual:

'one', 'two 'change', 'three 'unchanged'


Source: unix

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.