🎉 Happy News! The new website is out :-) Google

csvkit-bash

csvkit-bash

Read, filter, transform and output CSV/TSV data in bash. No Python required — pure shell with awk under the hood.

Installation

bpkg install jakwings/csvkit-bash

Usage

source bpkg_modules/csvkit-bash/csv.sh

# Get column by header name
csv_col data.csv "email"

# Filter rows where column matches value
csv_filter data.csv "country" "Italy"

# Print specific columns only
csv_cut data.csv "name,email,country"

# Count rows (excluding header)
csv_count data.csv

# Convert CSV to JSON array
csv_to_json data.csv

Pipeline example

csv_filter users.csv "active" "true" \
  | csv_cut - "name,email" \
  | csv_to_json