I have a .CSV file with over 500,000 lines that I need:
- find all the "spatial double quotes" and replace them with nothing
- find all the "spatial double quotes" and replace nothing
- find all double quotes and replace nothing
Example .CSV line:
"DISH Hartford & New Haven (Hartford)", "206", "FBNHD", " 06028", " East Windsor Hill", "CT", "Hartford County"
** Required Conclusion **
DISH Hartford & New Haven (Hartford),206,FBNHD,06028,East Windsor Hill,CT,Hartford County
I need to remove all double quotes ( "
) and spaces before commas and commas ( ,
).
I tried
$ cd /Users/Leonna/Downloads/
$ cat bs-B2Bformat.csv | sed s/ " //g
This gives me the "incomplete" command more than a hint, so I then tried:
$ cat bs-B2Bformat.csv | sed s/ " //g
sed: 1: "s/": unterminated substitute pattern
$ cat bs-B2Bformat.csv |sed s/ \" //g
sed: 1: "s/": unterminated substitute pattern
$
Too many lines for editing in Excel (Excel does not load all lines) or even a text editor. How can i fix this?