Skip to content

Instantly share code, notes, and snippets.

View pbreit's full-sized avatar

Patrick Breitenbach pbreit

  • San Francisco, CA
View GitHub Profile
@pbreit
pbreit / mongo-dump-csv.sh
Created August 10, 2016 05:39 — forked from mderazon/mongo-dump-csv.sh
Export all of Mongodb collections as csv without the need to specify fields
OIFS=$IFS;
IFS=",";
# fill in your details here
dbname=DBNAME
user=USERNAME
pass=PASSWORD
host=HOSTNAME:PORT
# first get all collections in the database