Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Newbie query help
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Marc  
View profile  
 More options Apr 2 2012, 6:11 pm
From: Marc <m...@10gen.com>
Date: Mon, 2 Apr 2012 15:11:13 -0700 (PDT)
Local: Mon, Apr 2 2012 6:11 pm
Subject: [mongodb-user] Re: Newbie query help
If you change your .js file to the following, this should work as you
expect it to:

db.hosts.find({}, { "cl.kvm_guest_36.t" : 1}).forEach(printjson)

This is mentioned in the "Differences between scripted and
interactive" section of the "Scripting the shell" documentation.
http://www.mongodb.org/display/DOCS/Scripting+the+shell

"When using the shell interactively, the shell will print returned
values and format where possible. This is done as a general
convenience from within the shell. However, when building a script,
the printing needs to be defined explicitly."

Thank you for trying MongoDB!  If you have any additional questions,
the Community is here to help!

--
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To post to this group, send email to mongodb-user@googlegroups.com.
To unsubscribe from this group, send email to mongodb-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.