Wednesday, March 14, 2018

Parsing CSV from bash

In one word csvtool.

To install it in Ubuntu:
sudo apt-get install csvtool
To install it in OS X:
brew install opam
opam init
eval `opam config env`
opam install csv
csvtool --help
To extract the second column (index 1) from sample.csv:
cat sample.csv | csvtool col 1 -
Find more from:
csvtool --help

No comments:

Followers