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

Mongo Shell fails to capture stdout when it is redirected

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 2.3.2
    • Shell
    • None
    • Confirmed on OS X and Linux 64
    • 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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: