Skip to content

Instantly share code, notes, and snippets.

Avatar

Orsiris de Jong deajan

View GitHub Profile
@deajan
deajan / csv2json.sh
Created Jul 9, 2018 — forked from dsliberty/csv2json.sh
CSV to JSON converter using BASH. Original script from http://blog.secaserver.com/2013/12/convert-csv-json-bash/
View csv2json.sh
#!/bin/bash
# CSV to JSON converter using BASH
# original script from http://blog.secaserver.com/2013/12/convert-csv-json-bash/
# thanks SecaGuy!
# Usage ./csv2json.sh input.csv > output.json
input=$1
[ -z $1 ] && echo "No CSV input file specified" && exit 1
[ ! -e $input ] && echo "Unable to locate $1" && exit 1
You can’t perform that action at this time.