Tech Support > Operating Systems > MS-DOS > Sed replacing double quotes/field delimittered in DOS
Sed replacing double quotes/field delimittered in DOS
Posted by dquill1@gmail.com on June 20th, 2008


I've been struggling with the syntax on this for a while now. I'm
trying to do a pretty common thing in that I want to replace double
quotes from a text file prior to importing it into a database. I've
got the syntax down somewhat, but it will simply not allow me to
search for a single double quote and replace it with nothing.

Below is where I currently stand:
sed "s/\"//g" c:\bcp\pp_master.csv >pp2.txt

this works to the screen, but will not work with the pipe since it
seems to think pp2.txt is a second input file.

This is what I'm trying to do. I've tried so many different
combinations, but none seem to work quite right.

pp_master.csv is a typical csv file, has double quotes around text and
nothing around numbers, etc.

I know this same question has been asked a million times, but it seems
usually it's asked with UNIX in mind, where searching fora double
quote isn't too difficult.

Any help would be greatly appreciated.

Posted by foxidrive on June 20th, 2008


On Thu, 19 Jun 2008 17:26:00 -0700 (PDT), dquill1@gmail.com wrote:

With GNU SED

sed "s/\x22//g" c:\bcp\pp_master.csv >pp2.txt




Similar Posts