I have this sting: the string's problem
and I want to change this to:
file 'the string'\''s problem'
My code looks like this:
newline=`echo "$string" | sed "s/'/'\\\''/g"`
echo $newline | sed "s|$newline|file '$newline'|g" >> "$newPList"
But the result from this is:
file 'the string'''s problem'
Any suggestions?