Last active
January 2, 2016 00:49
-
-
Save amanrx07/8225967 to your computer and use it in GitHub Desktop.
Revisions
-
aman singh revised this gist
Oct 7, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ #!/bin/bash host=localhost db=mydatabase for bson_file in `ls *.bson` do -
aman singh revised this gist
Jan 2, 2014 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,12 @@ #!/bin/bash host=localhost db=hoppr_services_development for bson_file in `ls *.bson` do echo "importing $bson_file" collection=$(echo "${bson_file}" | cut -d'.' -f1) bson_path="$(pwd)/$bson_file" mongoimport --host $host --db $db --collection $collection $bson_path done -
aman singh revised this gist
Jan 2, 2014 . 2 changed files with 12 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ #!/bin/bash HOST=localhost DB=hoppr_services_development for bson_file in `ls *.bson` do echo "importing $bson_file" collection=$(echo "${bson_file}" | cut -d'.' -f1) bson_path="$(pwd)/$bson_file" mongoimport --host $HOST --db $DB --collection $collection $bson_path done This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,9 +0,0 @@ -
aman singh created this gist
Jan 2, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ #!/bin/bash for name in `ls *.bson` do echo "importing $name" col=$(echo "${name}" | cut -d'.' -f1) FILE_PATH="$(pwd)/$name" mongoimport --host localhost --db hoppr_services_development --collection $col $FILE_PATH >> $(pwd)/import.log done