[SERVER-3774] Mongo shell echoing to stdout Created: 07/Sep/11  Updated: 11/Jul/16  Resolved: 07/Sep/11

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

Type: Improvement Priority: Minor - P4
Reporter: Phil Jackson Assignee: Antoine Girbal
Resolution: Done Votes: 0
Labels: scripting
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

All/Any


Participants:

 Description   

When running a script through the mongo shell it echos to stdout the script you're running. It shouldn't do this so that results can be captured unpolluted.



 Comments   
Comment by Phil Jackson [ 07/Sep/11 ]

Super, thanks for your time, Eliot.

Comment by Eliot Horowitz (Inactive) [ 07/Sep/11 ]

Ah - this is already fixed for 2.0
Can reproduce in 1.8.3, not in 2.0.0-rc2

Comment by Phil Jackson [ 07/Sep/11 ]

Hey Eliot.

Simple example might be this:

echo 'print( "Hi there!")' | mongo --quiet 2>/dev/null

Stdout is then:

> print( "Hi there!")
Hi there!
> bye

This makes scripting a pain. Ideally I think the output should just be "Hi there!" after the mongo shell has detected that there's a stream on STDIN.

Comment by Eliot Horowitz (Inactive) [ 07/Sep/11 ]

Can you send an examples?
That doesn't happen when I run a script and have never seen before.

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