I have a string like this:
'abc','D'art','abc'
Using sed I can replace D'a
for 'D\'a'
using:
sed -i "s/D'a/D\\\'a/g" file1.sql
The problem is that I have a huge SQL file, and every step of the way I have a new combination (D'A, T'b, P'a...)... So I am looking for an effective way of detecting single quotes in between letters so I can escape them.
Any Idea?