Edit csv file with bash

I' trying to use bash to edit a csv file from this format:

"apples","oranges","grapes"
"bread","butter","milk"

To this:

"apples
oranges
grapes"

So that if I would open the csv file in open office,

"apples
oranges
grapes"

Would be in one single cell, and

"bread
butter
millk"

Would also be in one single cell.

Hi locoroco,

This sed line it seems to work

sed 's/","/\n/g' input

At the moment to open in open office, select " as "Text separator".

Hope it helps,

Regards.

1 Like

thank you, it works!