How to use sed to remove all double quotes within a file
You just need to escape the quote in your first example:
$ sed 's/\"//g' file.txt
Are you sure you need to use sed? How about:
tr -d "\""
For replacing in place you can also do:
sed -i '' 's/\"//g' file.txt
or in Linux
sed -i 's/\"//g' file.txt
Additional comment. Yes this works:
sed 's/\"//g' infile.txt > outfile.txt
(however with batch gnu sed, will just print to screen)
In batch scripting (GNU SED), this was needed:
sed 's/\x22//g' infile.txt > outfile.txt