pk

Extract and transform fields from structured text data quickly

brewmacoslinux
Try with needOr install directly
Source

About

Field extractor command-line utility

Commands

pk

Examples

extract specific columns from CSV file$ pk -f 1,3,5 data.csv
get particular fields from JSON lines$ cat logs.jsonl | pk -f name,timestamp
pull columns from space separated values$ pk -f 2,4 -d ' ' input.txt
filter and display certain fields from delimited data$ pk -f id,email -d ',' users.csv
extract fields using custom delimiter$ cat access.log | pk -f 1,7 -d '|'