Running .js files with mongo client via command line

4,990 views
Skip to first unread message

Ashvin Savani

unread,
Jan 4, 2012, 1:39:09 PM1/4/12
to mongod...@googlegroups.com
I am new to mongo client world via command-line.

Can anyone point to some examples of how to execute .js file and print the output too. I want to use this stdout with other program.

Thanks in advance for your time and help!

Ashvin

Octavian Covalschi

unread,
Jan 4, 2012, 2:15:14 PM1/4/12
to mongod...@googlegroups.com
I'm sorry, but have you googled it at all?


Ashvin

--
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To view this discussion on the web visit https://groups.google.com/d/msg/mongodb-user/-/6B6D4cBjiLEJ.
To post to this group, send email to mongod...@googlegroups.com.
To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.

Jorge Puente Sarrín

unread,
Jan 6, 2012, 10:33:35 AM1/6/12
to mongod...@googlegroups.com
You can use load function.

load(jsfilename)                load and execute a .js file



2012/1/4 Octavian Covalschi <octavian....@gmail.com>



--
Atte.
Jorge Puente Sarrín.
Reply all
Reply to author
Forward
0 new messages