I have received a file (size > 1GB) which is CSV, separated by |
When I was importing it to bigquery we found out there are some unescaped " in the file.
How can I fix the file by using sed command
This|is|test only|to check quotes||123|""
second|line|"with quotes"|no text|""|345|""
third line|with|"start quote" and another " "|a word after quotes|" "|677|""
expected (no change in line 1,2)
This|is|test only|to check quotes||123|""
second|line|"with quotes"|no text|""| 345|""
third line|with|"start quote"" and another "" "|a word after quotes|" "|677|""
My idea is if there is a " that doesn't start or ends with | should be replaced with ""