[DOCS-12940] eval option for mongo shell needs double quotes in Windows Created: 05/Aug/19  Updated: 30/Oct/23  Resolved: 13/Sep/19

Status: Closed
Project: Documentation
Component/s: Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Task Priority: Trivial - P5
Reporter: Amit Jain Assignee: Andrew Feierabend (Inactive)
Resolution: Fixed Votes: 0
Labels: docs-onboarding-candidate
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 4 years, 21 weeks, 2 days ago
Epic Link: DOCSP-1769

 Description   

Description

The example in the "Use --eval to Print Query Results as JSON" section will not work in Windows. For Windows it must be double quotes instead:

> mongo --eval "db.collection.find().forEach(printjson)"

https://docs.mongodb.com/manual/reference/program/mongo/#use-eval-to-print-query-results-as-json

Scope of changes

Impact to Other Docs

MVP (Work and Date)

Resources (Scope or Design Docs, Invision, etc.)



 Comments   
Comment by Githook User [ 16/Sep/19 ]

Author:

{'username': 'andf-mongodb', 'email': 'andrew.feierabend@mongodb.com', 'name': 'Andrew Feierabend'}

Message: DOCS-12940 add Windows-specific quoting for --eval
Branch: v3.4
https://github.com/mongodb/docs/commit/4eff2e65f356ec3b33d34776e9b4e8d94bd1522e

Comment by Githook User [ 13/Sep/19 ]

Author:

{'username': 'andf-mongodb', 'email': 'andrew.feierabend@mongodb.com', 'name': 'Andrew Feierabend'}

Message: DOCS-12940 add Windows-specific quoting for --eval
Branch: v3.6
https://github.com/mongodb/docs/commit/b8fbe0cb47fdd2f6180a72c48f02bca07ed54c63

Comment by Githook User [ 13/Sep/19 ]

Author:

{'username': 'andf-mongodb', 'email': 'andrew.feierabend@mongodb.com', 'name': 'Andrew Feierabend'}

Message: DOCS-12940 add Windows-specific quoting for --eval
Branch: v4.0
https://github.com/mongodb/docs/commit/1309694761fd27e513ef8e34acbd05c4ddf75b81

Comment by Githook User [ 13/Sep/19 ]

Author:

{'username': 'andf-mongodb', 'email': 'andrew.feierabend@mongodb.com', 'name': 'Andrew Feierabend'}

Message: DOCS-12940 add Windows-specific quoting for --eval
Branch: master
https://github.com/mongodb/docs/commit/35379c5bde9bbf85b44faef59eed156de34d27a2

Generated at Thu Feb 08 08:06:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.