I know you can create a Javascript file that the MongoDB shell will execute upon startup. But I'm hoping for something more "lightweight" than that. I am using a Linux program that has a scripting language built in it. But the scripting language can not do operations like opening sockets, etc. It does have a "system" command to shell out to a Linux process. I would like to be able to push data into MongoDB via a Bash shell script and immediately return to the Linux process that spawned it, and quickly if I can since I intend to do this a few times a second (but not much more than that). It seems to me that shelling to the MongoDB shell and then have it execute a startup Javascript file would be a heavyweight operation relatively speaking? Is there a command line that I could craft from a bash script that would do a few quick MongoDB database operations and the exit? I have the MongoDB daemon running at all times on the default port.
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.