Hi,
I have a text file and I would like to replace all occurrences of single quote ' with two consecutive single quotes '' .
I have tried
sed s/\'/\'\'/ < Folder/outputFile.txt > Folder/otherFile.txt
but this replaces only the first occurrence of ' with ''. I want it to replace all the single quotes in the entire file with two single quotes.
So 'a' should become ''a'' and so on.
Thanks in advance.
Thank you very much for the replies. That ( sed "s/'/''/g" ) solved my problem Now I have another problem . I have a file with multi-line text in it. I want the same file to have its entire content surrounded by single quote. So if the file has text