Is there a way to write the output of a MongoDB find() query to a file just by simply using a Linux shell command or running a script?
Right now I have to manually type in step-by-step. Example:
$ mongo
> use owndb
> db.CollectionName.find(<query>) ### and then copy and paste the result on a text editor