Skip to content

Commit 666289a

Browse files
schmallisokay-kim
authored andcommitted
DOCSP-977: adds --outFile and --bsonFile options to bsondump docs
1 parent 28606ee commit 666289a

File tree

2 files changed

+34
-3
lines changed

2 files changed

+34
-3
lines changed

source/includes/options-bsondump.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,37 @@ description: |
5151
optional: true
5252
---
5353
program: bsondump
54+
name: bsonFile
55+
directive: option
56+
description: |
57+
.. versionadded:: 3.4
58+
59+
Specifies a path to a :term:`BSON file` to dump to JSON. {{role}} is
60+
an alternative to the positional :option:`<bsonFilename>` option.
61+
62+
By default, {{program}} reads from standard input.
63+
optional: true
64+
---
65+
program: bsondump
5466
name: <bsonFilename>
5567
directive: option
5668
description: |
5769
The final argument to {{program}} is a document containing
5870
:term:`BSON`. This data is typically generated by
5971
{{program}} or by MongoDB in a :term:`rollback` operation.
72+
optional: true
73+
---
74+
program: bsondump
75+
name: outFile
76+
directive: option
77+
description: |
78+
.. versionadded:: 3.4
79+
80+
Specifies the path of the file to which {{program}} should write
81+
its output JSON data.
82+
83+
By default, {{program}} writes to standard output.
84+
optional: true
6085
---
6186
program: bsondump
6287
name: pretty

source/reference/program/bsondump.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,24 @@ Options
5454

5555
.. include:: /includes/option/option-bsondump-pretty.rst
5656

57+
.. include:: /includes/option/option-bsondump-bsonFile.rst
58+
5759
.. include:: /includes/option/option-bsondump-<bsonFilename>.rst
5860

61+
.. include:: /includes/option/option-bsondump-outFile.rst
62+
5963
Use
6064
---
6165

66+
.. versionchanged:: 3.4
67+
6268
By default, :program:`bsondump` outputs data to standard output. To
63-
create corresponding :term:`JSON` files, you will need to use the
64-
shell redirect. See the following command:
69+
create corresponding :term:`JSON` files, you can use the
70+
:option:`--outFile` option:
6571

6672
.. code-block:: sh
6773

68-
bsondump collection.bson > collection.json
74+
bsondump --outFile collection.json collection.bson
6975

7076
Use the following command (at the system shell) to produce debugging
7177
output for a :term:`BSON` file:

0 commit comments

Comments
 (0)