[SERVER-316] Small issue with command line help for mongoexport Created: 25/Sep/09  Updated: 12/Jul/16  Resolved: 30/Sep/09

Status: Closed
Project: Core Server
Component/s: Tools
Affects Version/s: 1.1.1
Fix Version/s: None

Type: Improvement Priority: Trivial - P5
Reporter: Oliver Eilhard Assignee: Michael Dirolf
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mac OS X


Participants:

 Description   

The usage for mongoexport is not quite right.

It basically tells you to use "-f=field1,field2" when using --csv, but it only accepts "-f field1,field2"

Sorry to be so pedantic

pinocchio:~ oliver$ mongoexport --help
export options:
--help produce help message
-h [ --host ] arg mongo host to connect to
-d [ --db ] arg database to use
-c [ --collection ] arg collection to use (some commands)
-u [ --username ] arg username
-p [ --password ] arg password
--dbpath arg directly access mongod data files in this path,
instead of connecting to a mongod instance
-v [ --verbose ] be more verbose (include multiple times for more
verbosity e.g. -vvvvv)
-q [ --query ] arg query filter, as a JSON string
-f [ --fields ] arg comma seperated list of field names e.g. -f=name,age
--csv export to csv instead of json
-o [ --out ] arg output file; if not specified, stdout is used
pinocchio:~ oliver$ mongoexport -d services -c suppliers -f=name,city --csv
connected to: 127.0.0.1
csv mode requires a field list
pinocchio:~ oliver$ mongoexport -d services -c suppliers -f name,city --csv
connected to: 127.0.0.1
name,city
...



 Comments   
Comment by Michael Dirolf [ 25/Sep/09 ]

This is working in nightlies (and possibly 1.1.0), but not 1.0

Generated at Thu Feb 08 02:53:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.