I have a comma delimited CSV file that encapsulates the fields in double quote that I am attempting to operate on in bash. I would like to remove commas from inside the double quoted field for each line. I've looked at other solutions for the question asked here, and they revolved around using external libraries for CSV parsing, which isn't an option for my limited environment where the majority of the work is being done in awk and sed.
"A","B","C D","E, F","G"
desired output
"A","B","C D","E F","G"
With sed, to remove all commas followed by one non quote character and commas not preceded by one non quote character:
sed 's/,*\([^"]\)/\1/g;s/\([^"]\),*/\1/g' file
Edit:
Added *
quantifier to match subsequent commas.