BurntSushi / xsv

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

take field names from file #249

Open ggrothendieck opened 3 years ago

ggrothendieck commented 3 years ago

It would be convenient, particularly if there are a large number of field names, to be able to specify a file that contains them one per line, say. This would also avoid quoting problems, command line length restrictions, etc.

xsv select --fieldfile field.txt myfile.csv
BurntSushi commented 3 years ago

You should be able to just do xsv select -s <(cat field.txt) myfile.csv assuming you're using something like bash or zsh.

ggrothendieck commented 3 years ago

That did not work on WSL/bash when I tried it but in any case it does not help in Windows nor does it address the command line length problem. Biological data can have tens or hundreds of thousands of columns.