I have a string like this:
Using sed I can replace
D'a for '
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.