I have a file \"test.txt\" that contain the following
+foo+ +bar+
What I want to do is to replace them into:
\'foo\' \'bar\
You can also replace all instances of + with ' in the file by using tr:
+
'
tr
tr '+' "'" < inputfile