[SERVER-1536] Mongodb Shell: support for using it as a interpreter Created: 02/Aug/10 Updated: 12/Jul/16 Resolved: 11/Aug/10 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | None |
| Fix Version/s: | 1.7.0 |
| Type: | New Feature | Priority: | Trivial - P5 |
| Reporter: | Vilhelm K. Vardøy | Assignee: | Mathias Stearn |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
I would love the possibility to do something like this: #!/usr/bin/mongo --interpreter Doing this currently results in this (because of the first line which starts on #): For now, I have created a wrapper in bash to simulate the functionality (/usr/bin/mongointerpreter): Usage: I could probably manage to create a patch within the week if the feature sounds reasonable for you (a.k.a. if there's interest for it). |
| Comments |
| Comment by auto [ 11/Aug/10 ] |
|
Author: {'login': 'RedBeard0531', 'name': 'Mathias Stearn', 'email': 'mathias@10gen.com'}Message: ignore first line if starts with shebang |
| Comment by Vilhelm K. Vardøy [ 02/Aug/10 ] |
|
Did an improvement of the mongointerpreter-wrapper (adding support for arguments), if anyone should find it useful: #!/bin/bash Basically creates a array called arguments which is accessible from the script. |