pip install --user csvkit export PATH="$HOME/.local/bin:$PATH"To extract for instance the second column from clients.csv:
cat clients.csv | csvcut -c 2An alternative ... csvtool.
To install it in Ubuntu:
sudo apt-get install csvtoolTo install it in OS X:
brew install opam opam init eval `opam config env` opam install csvtool csvtool --helpTo extract the second column (index 1) from sample.csv:
cat sample.csv | ~/.opam/system/bin/csvtool col 1 -Find more from:
~/.opam/system/bin/csvtool --help
2 comments:
Thanks!
This line:
opam install csv
Should be:
opam install csvtool
Thanks Johnathan. Fixed.
Post a Comment