It's a common mistake to forget to escape literal occurrences of the same character used to "quote" fields.
Windowsish
perl -pe "s{(?=\")}{\"}g; s{,}{\",\"}g; s{^}{\"}; s{$}{\"};" infile.csv > outfile.csvUnixish
perl -pe 's{(?=")}{"}g; s{,}{","}g; s{^}{"}; s{$}{"};' infile > outfileIn reply to Re^2: One Liner to double quote every field in a delimited fle (Updated!)
by Jim
in thread One Liner to double quote every field in a delimited file
by BOK_in_NEPA
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |