BurntSushi / xsv

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

Add "exclude" command #206

Open lalaithion opened 4 years ago

lalaithion commented 4 years ago

Issue #61 describes an idea for an exclude command. I needed the functionality of this command, so I added it. The code for it is largely based on the join command.

I also formatted the repository using cargo fmt.

BurntSushi commented 4 years ago

Please don't run rustfmt. I want to eventually switch to it, but doing so would make all extant PRs difficult to merge. Including rustfmt in this PR decreases its chances of me merging it.

lalaithion commented 4 years ago

Undid rstfmt.

rodion-k commented 4 years ago

I have tested it and find that rows are not excluded if they have empty fields. For example: file1.csv

id,name
1,test1
2,test2
3,

file2.csv

id,name
1,test1
2,test2updated
3,

xsv exclude - file1.csv - file2.csv

id,name
2,test2updated
3,

Row 3 is not excluded.