Skip to content

Commit 0712733

Browse files
author
Ed Costello
committed
DOCS-527 clean up formatting
1 parent d1af11c commit 0712733

File tree

1 file changed

+44
-39
lines changed

1 file changed

+44
-39
lines changed

source/reference/mongo.txt

Lines changed: 44 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
.. _mongo:
2-
3-
.. meta::
4-
:description: The mongo shell man page
5-
:keywords: man page, mongo, javascript, shell
6-
7-
.. default-domain:: mongodb
8-
91
================
102
mongo
113
================
4+
.. only:: html
5+
6+
.. meta::
7+
:description: The mongo command man page.
8+
:keywords: mongo, mongodb, man page, mongo process, mongo shell
9+
10+
.. default-domain:: mongodb
11+
12+
.. _mongo:
1213

1314
Synopsis
1415
--------
@@ -19,10 +20,10 @@ Description
1920
-----------
2021

2122
:program:`mongo` is an interactive JavaScript shell interface to
22-
MongoDB. :program:`mongo` provides a powerful interface
23+
MongoDB. The :program:`mongo` command provides a powerful interface
2324
for systems administrators as well as a way to test queries and
2425
operations directly with the database. To increase the flexibility of
25-
:program:`mongo`, the shell provides a fully functional JavaScript
26+
the :program:`mongo` command, the shell provides a fully functional JavaScript
2627
environment. This document addresses the basic invocation of the
2728
:program:`mongo` shell and an overview of its usage.
2829

@@ -37,60 +38,63 @@ Options
3738

3839
.. cmdoption:: --shell
3940

40-
If you invoke the :program:`mongo` and specify a :term:`JavaScript`
41-
file as an argument, or ":option:`mongo --eval`" the
42-
:option:`--shell` option provides the user with a shell prompt after the
43-
file finishes executing.
41+
Enables the shell interface after a :term:`JavaScript` file is evaluated.
42+
If you invoke the :program:`mongo` command and specify a JavaScript
43+
file as an argument, or use :option:`mongo --eval` to specify
44+
JavaScript on the command line, the :option:`mongo --shell` option
45+
provides the user with a shell prompt after the file finishes
46+
executing.
4447

4548
.. cmdoption:: --nodb
4649

47-
Use this option to prevent the shell from connecting to any
48-
database instance.
50+
Prevents the shell from connecting to any database instances.
4951

5052
.. cmdoption:: --norc
5153

52-
By default :program:`mongo` runs the ``~/.mongorc.js`` file when it
53-
starts. Use this option to prevent the shell from sourcing this
54-
file on start up.
55-
54+
Prevents the shell from sourcing and evaluating
55+
:file:`~/.mongorc.js` on startup.
56+
5657
.. cmdoption:: --quiet
5758

5859
Silences output from the shell during the connection process.
5960

6061
.. cmdoption:: --port <PORT>
6162

62-
Specify the port where the :program:`mongod` or :program:`mongos`
63+
Specifies the port where the :program:`mongod` or :program:`mongos`
6364
instance is listening. Unless specified :program:`mongo` connects
6465
to :program:`mongod` instances on port 27017, which is the default
6566
:program:`mongod` port.
6667

6768
.. cmdoption:: --host <HOSTNAME>
6869

69-
Specific the host where the :program:`mongod` or :program:`mongos` is running to
70+
specifies the host where the :program:`mongod` or :program:`mongos` is running to
7071
connect to as ``<HOSTNAME>``. By default :program:`mongo` will attempt
71-
to connect to MongoDB process running on the localhost.
72+
to connect to a MongoDB process running on the localhost.
7273

7374
.. cmdoption:: --eval <JAVASCRIPT>
7475

75-
Evaluates a JavaScript specified as an argument to this
76+
Evaluates a JavaScript expression specified as an argument to this
7677
option. :program:`mongo` does not load its own environment when evaluating
7778
code: as a result many options of the shell environment are not
7879
available.
7980

8081
.. cmdoption:: --username <USERNAME>, -u <USERNAME>
8182

82-
Specify a username to authenticate to the MongoDB instance, if your
83-
database requires authentication. Use in conjunction with the
83+
Specifies a username to authenticate to the MongoDB instance.
84+
Use in conjunction with the
8485
:option:`mongo --password` option to supply a password.
86+
If you specify a username and password but the default database
87+
or the specified database do not require authentication,
88+
:program:`mongo` will exit with an exception.
8589

8690
.. cmdoption:: --password <password>, -p <password>
8791

88-
Specify a password to authenticate to the MongoDB instance, if your
89-
database requires authentication. Use in conjunction with the
92+
Specifies a password to authenticate to the MongoDB instance.
93+
Use in conjunction with the
9094
:option:`mongo --username` option to supply a username. If you
9195
specify a :option:`--username <mongo --username>` without the
9296
:option:`mongo --password` option, :program:`mongo` will prompt for a
93-
password interactively.
97+
password interactively if authentication is required.
9498

9599
.. cmdoption:: --help, -h
96100

@@ -114,7 +118,7 @@ Options
114118

115119
.. cmdoption:: <db address>
116120

117-
Specify the "database address" of the database to connect to. For
121+
Specifies the "database address" of the database to connect to. For
118122
example: ::
119123

120124
mongo admin
@@ -133,8 +137,9 @@ Options
133137

134138
.. cmdoption:: <file.js>
135139

136-
Optionally, specify a JavaScript file as the final argument to the
137-
shell. The shell will run the file and then exit. Use the
140+
Specifies a JavaScript file to run and then exit.
141+
Must be the last option specified.
142+
Use the
138143
:option:`mongo --shell` option to return to a shell after the file
139144
finishes running.
140145

@@ -224,21 +229,21 @@ Environment
224229

225230
.. envvar:: EDITOR
226231

227-
Specify the path to an editor to use with the `edit` shell command.
232+
Specifies the path to an editor to use with the `edit` shell command.
228233
A JavaScript variable `EDITOR` will override the value of
229234
:envvar:`EDITOR`.
230235

231236
.. envvar:: HOME
232237

233-
Specify the path to the home directory where `.mongorc.js` will be
234-
read from and `.dbshell` will be written to.
238+
specifies the path to the home directory where :file:`.mongorc.js` will be
239+
read from and :file:`.dbshell` will be written to.
235240

236241
.. envvar:: HOMEDRIVE
237242

238-
Specify the Windows path to the home directory where `.mongorc.js` will be
239-
read from and `.dbshell` will be written to.
243+
specifies the Windows path to the home directory where :file:`.mongorc.js` will be
244+
read from and :file:`.dbshell` will be written to.
240245

241246
.. envvar:: HOMEPATH
242247

243-
Specify the Windows path to the home directory where `.mongorc.js` will be
244-
read from and `.dbshell` will be written to.
248+
specifies the Windows path to the home directory where :file:`.mongorc.js` will be
249+
read from and :file:`.dbshell` will be written to.

0 commit comments

Comments
 (0)