[SERVER-1194] --eval problem with shell Created: 04/Jun/10  Updated: 07/Oct/15  Resolved: 23/Sep/15

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: 3.1.9

Type: Bug Priority: Trivial - P5
Reporter: Dwight Merriman Assignee: Kevin Pulo
Resolution: Done Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Minor Change
Participants:

 Description   

C:\Users\dm\Desktop>mongo --eval db.foo.find()
MongoDB shell version: 1.5.3-pre-
url: test
connecting to: test
DBQuery: test.foo -> undefined



 Comments   
Comment by Githook User [ 23/Sep/15 ]

Author:

{u'username': u'devkev', u'name': u'Kevin Pulo', u'email': u'kevin.pulo@mongodb.com'}

Message: SERVER-1194: --eval use shellPrintHelper() instead of print()
Branch: master
https://github.com/mongodb/mongo/commit/52294f76710c4c891aebfe594f4ec8029b8c4e8c

Comment by Jonathan Hendler [ 01/Oct/11 ]

seen http://stackoverflow.com/questions/3595265/basics-of-mongodb-scripts-how-to ?

Comment by Jonathan Hendler [ 01/Oct/11 ]

Experiences an eval() issue from scala with same error message
https://jira.mongodb.org/browse/SCALA-55?focusedCommentId=57652&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-57652

Comment by Rama Roberts [ 22/Feb/11 ]

Its not pretty, but you can always do something like:

db.foo.find().forEach(function(r)

{print(tojson(r))}

);

Generated at Thu Feb 08 02:56:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.