I have the following list of words:
name,id,3
I need to have it double quoted like this:
\"name,id,3\"
I
Before using sed command, you can use \ as escape character then it will print " in your string. As an example, i put the similar string to first line of a text file with below command:
var = "\"name,id,3\"" sed -i '1i' "$var" /tmp/out.txt