CSV Kit Notes Tips and Examples

Last modified: 
Tuesday, 13. June 2017 - 3:50

Nice thing to use when working with CSV-files is CSV Kit.

See the file statistics: csvstat -e UTF-16 test.csv

Merge all files in a folder: csvstack -e UTF-16 -t *.csv > all.csv

Save column 2 to output .csv: csvcut -c 2 -e UTF-8 all.csv > output.csv

Remove duplicates:

Sort the file first: sort -n output.csv > sorted.csv

Save only unique values: uniq -u sorted.csv > unique.csv

 

 

 

 

 

Tags: