简体   繁体   English

mongo shell --eval无法运行

[英]mongo shell --eval does not run

由于某种原因,我无法在mongo中评估此简单字符串,我认为这是因为$exists参数。

mongo database --eval "db.products.find({'csv': {'$exists': false}}, {'original.name': true, 'original.sku': true})"

Your quotes are the wrong way around. 您的报价是错误的方法。 Use ' on the wrapping of the statement rather than " . Just the important parts: 在语句的换行符上使用' ,而不要使用" 。仅重要部分:

--eval 'db.products.find({ "csv": { "$exists": false } })'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM