Last active
August 29, 2019 10:38
-
-
Save xmariachi/75e55cbaff25d5aa314cc2b13a4ab7bd to your computer and use it in GitHub Desktop.
Converting output from robomongo (Robo3T) into CSV
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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