How to remove the double quotes in a CSV file on Ubuntu

This post introduces the simplest way to remove all double quotes in a csv file on Ubuntu (via terminal).

If you have a CSV file like


and want something like


Or you have something like this

and want something like this

In your terminal,

cd to the directory where input.csv file is located and then issue the following command:

$ tr -d '"' <input.csv> output.csv

Note: tr stands for translateThe d flag causes tr command to delete all tokens of the specified set of characters from its input.  


8 Linux TR Command Examples (pdf)

tr (Unix)

Leave a Reply

Your email address will not be published. Required fields are marked *