BurntSushi / xsv

A fast CSV command line toolkit written in Rust.
The Unlicense
10.29k stars 317 forks source link

get rid of quotation when using partition by column #266

Closed verajosemanuel closed 3 years ago

verajosemanuel commented 3 years ago

I have a CSV with many columns. One of them is a long string using xml format. I want to partition by ID but the output files are filled with lots of quotes.

How to avoid this behaviour?

xsv select myId,xml_content | xsv partition --filename part{} myId

myId,xml_content
1,"<isnew value=""""/><email value=""""/><city value=""""/>"

Desired output

myId,xml_content
1,<isnew value=""/><email value=""/><city value=""/>
BurntSushi commented 3 years ago

Your desired output is invalid CSV.

verajosemanuel commented 3 years ago

I know, but I am forced to work with it. So any suggestion on gettin rid of double quotation when partitioning would be great

BurntSushi commented 3 years ago

xsv can't do it. You'll have to write your own program to output non-CSV data.