I have the following list of words:
name,id,3
I need to have it double quoted like this:
\"name,id,3\"
I
Your input file has carriage returns at the end of the lines. You need to use dos2unix on the file to remove them. Or you can do this:
dos2unix
sed 's/\(.*\)\r/"\1"/g'
which will remove the carriage return and add the quotes.