Shell script to correct the data

Hi,

I have below data in my flat file.I would like to remove the quotes and comma necessary from the data.Below is the details I would like to have in my output.

Could anybody help me providing the Unix shell script for this.

Input :

ABC,ABC,10/15/2012,"47,936,164.567 ","1,036,997.453 ",0 ,"48,973,162 ",,0 ,,,"18,352,692.981 ","397,022.786 ",,"18,749,714 ",,,,,,

Output :

ABC,ABC,10/15/2012,47936164.567 ,"1036997.453 ",0 ,"48,973,162 ",,0 ,,,18352692.981 ,397022.786 ,,"18,749,714 "

I couldn't understand the requirement correctly
The below output you have provided have quotes and unnecessary commas

ABC,ABC,10/15/2012,47936164.567 ,"1036997.453 ",0 ,"48,973,162 ",,0 ,,,18352692.981 ,397022.786 ,,"18,749,714 "

How do you know which quote is necessary and how to you know the commas in last number are required

---------- Post updated at 07:11 AM ---------- Previous update was at 07:07 AM ----------

But, if you want to remove all quotes and unnecessary commas, use the below code

awk -F "\"" '{for(i = 2; i <= NF; i += 2)
  {gsub(",", X, $i)}; out = $1
  for(i = 2; i <= NF; i++) {out = (out $i)};
  print out}' file | sed 's/,\{1,\}$//'

Your requirements are ambiguous and this sounds like a homework assignment. If this is a homework assignment, you have been told before about the rules for filing homework assignments.

If this is not a homework assignment, please describe the project you are working on that requires this software AND clearly describe the criteria that determines whether or not a comma in your input is "necessary".