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

Mongo Shell fails to capture stdout when it is redirected

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.3.2
    • Fix Version/s: None
    • Component/s: Shell
    • Labels:
      None
    • Environment:
      Confirmed on OS X and Linux 64
    • Backwards Compatibility:
      Major Change

      Description

      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
      $

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              stennie Stennie Steneker
              Reporter:
              thomas.boyd Thomas Boyd
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: