[SERVER-14880] Ability to output to file from mongo shell Created: 13/Aug/14 Updated: 10/May/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | JavaScript, Shell |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Kevin Pulo | Assignee: | DO NOT USE - Backlog - Platform Team |
| Resolution: | Unresolved | Votes: | 6 |
| Labels: | ml-retriage, move-sa | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||
| Description |
|
It would be useful to have a version of print() that can output to a file, eg.
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:
And passing no parameters flushes/closes all open files:
The above example usage is more or less the model used by awk/gawk. |
| Comments |
| Comment by Steven Vannelli [ 10/May/22 ] |
|
Moving this ticket to the Backlog and removing the "Backlog" fixVersion as per our latest policy for using fixVersions. |