Skip to content

Instantly share code, notes, and snippets.

Verifying that +jasonwash is my blockchain ID. https://onename.com/jasonwash
@jasonwash
jasonwash / make_csv.sh
Created March 5, 2014 18:45
Shell script to create a CSV file from a MongoDB collection. The CSV file will contain all possible top-level keys. Embedded documents are not handled.
#!/bin/bash
function usage {
printf "Usage:\n$0 <db_name> <collection_name> <output_csv_file>\n"
exit 1
}
db_name=$1
collection=$2
output_file=$3