Skip to content

Instantly share code, notes, and snippets.

View xmariachi's full-sized avatar

Diego C xmariachi

  • Allora Labs
  • Zaragoza, Spain
  • 09:59 (UTC -12:00)
View GitHub Profile
@xmariachi
xmariachi / json2csv.sh
Last active August 29, 2019 10:38
Converting output from robomongo (Robo3T) into CSV
#!/bin/bash
FILE=$1
FIELDS_AS_CSV_LIST=$2
cat $FILE | sed 's/\/\*.*\*\///g' |jq -c '.' |json2csv -k $FIELDS_AS_CSV_LIST