[SERVER-2837] shell --quiet w/stdin Created: 25/Mar/11  Updated: 12/Jul/16  Resolved: 28/Nov/11

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

Type: Improvement Priority: Minor - P4
Reporter: Pierre Baillet Assignee: Tad Marshall
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

It would be very useful from a shell scripting perspective to have a --quiet option that causes the shell to not print out the banner.



 Comments   
Comment by Tad Marshall [ 28/Nov/11 ]

Fixed by commit 18fb262f9e2c8ccf6da776d1208d706eb333937b .

Comment by auto [ 28/Nov/11 ]

Author:

{u'login': u'', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}

Message: SERVER-2837 – be more friendly to piping in the shell

Don't print 'bye' on exit when --quiet is set.
Branch: master
https://github.com/mongodb/mongo/commit/18fb262f9e2c8ccf6da776d1208d706eb333937b

Comment by Tad Marshall [ 28/Nov/11 ]

In my tests, the only extraneous stuff I'm seeing when trying to reproduce your example is the exit text "bye". That is easy to fix.

Comment by Pierre Baillet [ 25/Mar/11 ]

Not fixed when fed through stdin :

#echo "show dbs" | mongo --quiet
MongoDB shell version: 1.6.6-pre-
connecting to: --quiet
> activities
admin
core
...

Works as advertised without that:

mongo --quiet
>
> exit
bye

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