csvCol

command module
v0.0.0-...-bd61835 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2021 License: Unlicense Imports: 10 Imported by: 0

README

csvCol

shows/hides columns of csv files

Getting Started

Build the executable with go build.

./csvCol --help will give you this:

Usage of csvCol:
  -C value
        list of columns to show by name
  -c value
        list of columns to show
  -f string
        path to input file instead of stdin
  -s string
        separator character (defaults to a comma) (default ",")
  -v    hide (instead of showing) the columns that were selected

Examples

  • show the first two columns:
./csvCol -c=0 -c=1 -f="./customers.csv"
  • show all columns except the first two:
./csvCol -v -c=0 -c=1 -f="./customers.csv"
  • show specific column by name
./csvCol -C="email" -f="./customers.csv"
  • find duplicate emails
./csvCol -f="customers.csv" -C="email" | sort | uniq -c | grep -v -e"^\s*1[^\d]" | sort -nr

Built With

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL