Skip to content

Latest commit

 

History

History
51 lines (32 loc) · 857 Bytes

README.md

File metadata and controls

51 lines (32 loc) · 857 Bytes

README

Demonstrate how to parse and work with CSV files

TODO:

NOTES:

  • Use mechatroner.rainbow-csv in vscode. You can also use it to align fields.

Example

Show how to read a csv file and loop over it row by row.

./parse_csv.sh

Conversion

CSV 2 JSON

An example script to take a csv data piped in and convert it into a json document.

# simple example using jq to create a json doc
cat ./test.map | ./csv2json.sh

TSV 2 CSV

Convert a TSV to CSV

tr '\t' ',' < ./file.tsv > ./file.csv

Remove Columns

cut -d',' -f4- ./out/mydata.csv > ./out/mydata_3_less_columns.csv

Resources