Skip to content

Instantly share code, notes, and snippets.

@fabien0102
Created March 15, 2015 09:33
Show Gist options
  • Save fabien0102/88dcaa184d801fd5e67a to your computer and use it in GitHub Desktop.
Save fabien0102/88dcaa184d801fd5e67a to your computer and use it in GitHub Desktop.
Import multiple json files into mongoDB
ls -1 *.json | while read jsonfile; do mongoimport -d support -c logs -file $jsonfile --jsonArray -type json; done
@saloni-jain484
Copy link

saloni-jain484 commented Oct 1, 2020

how to execute script in windows machine?? As in command prompt linux command will not work
@fabien0102

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment