Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-8211

Mongo Shell fails to capture stdout when it is redirected

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.3.2
    • Component/s: Shell
    • Labels:
      None
    • Environment:
      Confirmed on OS X and Linux 64
    • Major Change

      Cannot capture output from print() commands issued to mongo shell when running a script and redirecting stdout to a file. Shell behaves as expected in 2.2.2, but have confirmed the unexpected behavior in 2.3.2, and 2013-01-14 nightly.

      $ rm it.log
      $ cat it.js
      print("Hello");
      $ ./mongo --nodb ./it.js 1> it.log
      $ cat it.log
      MongoDB shell version: 2.3.3-pre-
      $ ./mongo --nodb ./it.js
      MongoDB shell version: 2.3.3-pre-
      Hello
      $

            Assignee:
            stephen.steneker@mongodb.com Stennie Steneker (Inactive)
            Reporter:
            thomas.boyd Thomas Boyd
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: