Skip to content

Instantly share code, notes, and snippets.

@xmariachi
Last active August 29, 2019 10:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xmariachi/75e55cbaff25d5aa314cc2b13a4ab7bd to your computer and use it in GitHub Desktop.
Save xmariachi/75e55cbaff25d5aa314cc2b13a4ab7bd to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment