remove quoted field and contents inside file.
by agentguerry from LinuxQuestions.org on (#588CA)
hi,
i'm looking for the best approach to remove fields in a file that have "1,200.00" (and other dollar values) in it.
the file is a comma delimited file. some lines have a money value, some don't.
but anytime there is a value of money its in quotes.
what is the best way to remove the quotes and everything in it.
Example:
info,Doe,John,,08/10/2020,0,,40,,"1,200.00",,,06/08/2020:12:35:35,41255827,N,0
Wanted output:
info,Doe,John,,08/10/2020,0,,40,,,,,06/08/2020:12:35:35,41255827,N,0
Tried a few sed and cut variants but couldn't wrap my head around it.


i'm looking for the best approach to remove fields in a file that have "1,200.00" (and other dollar values) in it.
the file is a comma delimited file. some lines have a money value, some don't.
but anytime there is a value of money its in quotes.
what is the best way to remove the quotes and everything in it.
Example:
info,Doe,John,,08/10/2020,0,,40,,"1,200.00",,,06/08/2020:12:35:35,41255827,N,0
Wanted output:
info,Doe,John,,08/10/2020,0,,40,,,,,06/08/2020:12:35:35,41255827,N,0
Tried a few sed and cut variants but couldn't wrap my head around it.