MongoExport太多位置选项 [英] MongoExport Too many positional options
问题描述
我试图通过过滤日期范围来使用远程连接运行mongoexport.一个非常简单的查询,但是,我遇到了位置错误问题.我已经阅读了有关它的大部分文章,进行了时代转换等,但是完全碰到了一个障碍.希望这里的人可以弄清楚我在做什么错.
下面是我的命令和错误消息:
C:\ mongoexport --host 1.1.1.111:1111 --db IQ -u user -p password --collection CallLog --out calllog.json --query '{"Call.StartTime":{"$gte":new Date(1411066005000),"$lte": new Date(1406918805000)}}'
Error parsing command line: too many positional options
try 'mongoexport --help' for more information
当连接和运行来自mongo的查询时,我们使用authenticationDatabase选项.也尝试使用上述方法.但是同样的错误.
我在这里做错了什么?
非常感谢.
关于, 西马克(Simak)
通过互换和'标记解决了这个问题.
谢谢!
Am trying to run a mongoexport using a remote connection by filtering on date ranges. A very simple query, however, I am running into positional errors issue. I;ve read through most of the posts regarding it, did the epoch conversion etc. But completely hit a block. Hopefully someone here can figure out what I am doing wrong.
Below is my command and the error message:
C:\ mongoexport --host 1.1.1.111:1111 --db IQ -u user -p password --collection CallLog --out calllog.json --query '{"Call.StartTime":{"$gte":new Date(1411066005000),"$lte": new Date(1406918805000)}}'
Error parsing command line: too many positional options
try 'mongoexport --help' for more information
We use the authenticationDatabase option when connecting and running queries from mongo. Tried the above using that as well. But same error.
What am I doing wrong here?
Thanks so much in advance.
Regards, Simak
resolved this by interchanging the " and ' marks..Didn't realise that those made all the difference.
Thanks!
这篇关于MongoExport太多位置选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!