-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.8.0
-
Component/s: CLI Module
-
None
-
Environment:OS: Linux
Additional info: mongosh 1.8.0
-
Not Needed
Problem Statement/Rationale
While using mongo utility with --quiet option, everything is fine to get data from mongodb server without unnecessary output. Using the mongosh I need extra work to eliminate unnecessary characteres from the output.
Please be sure to attach relevant logs with any sensitive data redacted.
How to retrieve logs for: Compass; Shell
//example with mongo utility
echo "db.serverStatus().mem.resident" | mongo --port 27017 --quiet
37212
//example with mongosh utility
echo "db.serverStatus().mem.resident" | mongosh --port 27017 --quiet
PrdSet [direct: primary] test> db.serverStatus().mem.resident
37212
Steps to Reproduce
echo "db.serverStatus().mem.resident" | mongosh --port 27017 --quiet
Expected Results
Just a number without any additional information about the server I am connecting to
Actual Results
PrdSet [direct: primary] test> db.serverStatus().mem.resident
37212
Additional Notes
Expected results
37212