Skip to content

Instantly share code, notes, and snippets.

Avatar

Orsiris de Jong deajan

View GitHub Profile
@dsliberty
dsliberty / csv2json.sh
Created Nov 13, 2015
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