Replacing Double Quote in Double Quote incsv file

Hi All ,
We have source data file as csv file and since data could contain commas ,each attribute is quoted into double quotes.However problem is that some of the attributa data also contain double quotes which is converted to double double quote while creating csv file

XLs data :

"cd"abc,cde"gh",fig"hi"

CSV File:

"""cd""abc","cde""gh""",fig""hi"""

Desired output file is

""cd"abc","cde"gh"","fig"hi""

I tried lot of sed options but unable to get desired result . Please help .

$ cat file
"""cd""abc","cde""gh""",fig""hi"""
$ sed 's/""/"/g' file
""cd"abc","cde"gh"",fig"hi""

Hello Shalani,

Welcome to forums, kindly use code tags for commands/codes/Inputs you are using in your posts, following may help in your query.

awk '{gsub(/\"\"/,"\"",$0);} 1' Input_file

Output will be as follows.

""cd"abc","cde"gh"",fig"hi""

Thanks,
R. Singh