Skip to content

Instantly share code, notes, and snippets.

Avatar

xmariachi

View GitHub Profile
@xmariachi
xmariachi / json2csv.sh
Last active Aug 29, 2019
Converting output from robomongo (Robo3T) into CSV
View json2csv.sh
#!/bin/bash
FILE=$1
FIELDS_AS_CSV_LIST=$2
cat $FILE | sed 's/\/\*.*\*\///g' |jq -c '.' |json2csv -k $FIELDS_AS_CSV_LIST
You can’t perform that action at this time.