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

Small issue with command line help for mongoexport

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: 1.1.1
    • Component/s: Tools
    • None
    • Environment:
      Mac OS X
    • None
    • 0
    • None
    • None
    • None
    • None
    • None
    • None

      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
      ...

            Assignee:
            mike Michael Dirolf (Inactive)
            Reporter:
            oliver Oliver Eilhard
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: