Ability to output to file from mongo shell

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: JavaScript, Shell
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      It would be useful to have a version of print() that can output to a file, eg.

      fprint("/tmp/whatever", "some message")
      

      A nice bonus would be to also flush or close the file descriptors (closing the file after every fprint would be terrible for performance), eg:

      fflush("/tmp/whatever")
      
      fclose("/tmp/whatever")
      

      And passing no parameters flushes/closes all open files:

      fflush()
      
      fclose()
      

      The above example usage is more or less the model used by awk/gawk.

              Assignee:
              DO NOT USE - Backlog - Platform Team
              Reporter:
              Kevin Pulo
              Votes:
              6 Vote for this issue
              Watchers:
              13 Start watching this issue

                Created:
                Updated: