From cebd18a29cf27d15137e5bdc5bd3acd5b919786e Mon Sep 17 00:00:00 2001 From: andf-mongodb Date: Wed, 21 Apr 2021 14:43:00 -0400 Subject: [PATCH] DOCSP-15698 identify and correct codeblock indentation --- source/core/index-sparse.txt | 6 +- source/core/query-optimization.txt | 2 +- source/includes/example-push-each.rst | 8 +-- source/includes/output-upgrade-check.rst | 2 +- source/reference/command/collStats.txt | 2 +- source/reference/command/currentOp.txt | 16 ++--- source/reference/command/dataSize.txt | 2 +- source/reference/command/findAndModify.txt | 28 ++++----- source/reference/command/removeShard.txt | 2 +- source/reference/command/usersInfo.txt | 2 +- source/reference/command/validate.txt | 2 +- ...ation-ubuntu-community-troubleshooting.txt | 2 +- .../method/db.collection.bulkWrite.txt | 42 ++++++------- source/reference/method/db.currentOp.txt | 14 ++--- .../operator/aggregation/dateFromString.txt | 40 ++++++------- .../reference/operator/aggregation/match.txt | 8 +-- .../reference/operator/aggregation/range.txt | 14 ++--- .../reference/operator/aggregation/redact.txt | 28 ++++----- .../reference/operator/aggregation/reduce.txt | 60 +++++++++---------- .../operator/aggregation/subtract.txt | 6 +- .../reference/operator/query/bitsAnySet.txt | 2 +- .../reference/operator/query/jsonSchema.txt | 4 +- source/reference/operator/update/mul.txt | 16 ++--- .../operator/update/positional-all.txt | 32 +++++----- source/release-notes/3.4-compatibility.txt | 8 +-- .../release-notes/4.0-upgrade-replica-set.txt | 4 +- source/tutorial/configure-mongo-shell.txt | 10 ++-- ...ed-cluster-with-keyfile-access-control.txt | 4 +- ...n-existing-sharded-cluster-no-downtime.txt | 26 ++++---- 29 files changed, 196 insertions(+), 196 deletions(-) diff --git a/source/core/index-sparse.txt b/source/core/index-sparse.txt index eb95cf2343a..d48f8bdee5c 100644 --- a/source/core/index-sparse.txt +++ b/source/core/index-sparse.txt @@ -125,7 +125,7 @@ The collection has a sparse index on the field ``score``: .. code-block:: javascript - db.scores.createIndex( { score: 1 } , { sparse: true } ) + db.scores.createIndex( { score: 1 } , { sparse: true } ) Then, the following query on the ``scores`` collection uses the sparse index to return the documents that have the ``score`` field less than @@ -160,7 +160,7 @@ The collection has a sparse index on the field ``score``: .. code-block:: javascript - db.scores.createIndex( { score: 1 } , { sparse: true } ) + db.scores.createIndex( { score: 1 } , { sparse: true } ) Because the document for the userid ``"newbie"`` does not contain the ``score`` field, the sparse index does not contain an entry for that @@ -217,7 +217,7 @@ the following operation: .. code-block:: javascript - db.scores.createIndex( { score: 1 } , { sparse: true, unique: true } ) + db.scores.createIndex( { score: 1 } , { sparse: true, unique: true } ) This index *would permit* the insertion of documents that had unique values for the ``score`` field *or* did not include a ``score`` field. diff --git a/source/core/query-optimization.txt b/source/core/query-optimization.txt index c7b74615543..1239baddd7a 100644 --- a/source/core/query-optimization.txt +++ b/source/core/query-optimization.txt @@ -107,7 +107,7 @@ For example, a collection ``inventory`` has the following index on the .. code-block:: javascript - db.inventory.createIndex( { type: 1, item: 1 } ) + db.inventory.createIndex( { type: 1, item: 1 } ) This index will cover the following operation which queries on the ``type`` and ``item`` fields and returns only the ``item`` field: diff --git a/source/includes/example-push-each.rst b/source/includes/example-push-each.rst index 417f386a29d..9bc52578497 100644 --- a/source/includes/example-push-each.rst +++ b/source/includes/example-push-each.rst @@ -4,7 +4,7 @@ equals ``joe``: .. code-block:: javascript - db.students.update( - { name: "joe" }, - { $push: { scores: { $each: [ 90, 92, 85 ] } } } - ) + db.students.update( + { name: "joe" }, + { $push: { scores: { $each: [ 90, 92, 85 ] } } } + ) diff --git a/source/includes/output-upgrade-check.rst b/source/includes/output-upgrade-check.rst index 91f6441c02c..cf3b2fcc548 100644 --- a/source/includes/output-upgrade-check.rst +++ b/source/includes/output-upgrade-check.rst @@ -47,7 +47,7 @@ Warning Output .. code-block:: none - Warning: upgradeCheck only supports V1 indexes. Skipping index: + Warning: upgradeCheck only supports V1 indexes. Skipping index: To resolve, remove the invalid index and recreate the index omitting the version specification, or reindex the collection. Reindex operation diff --git a/source/reference/command/collStats.txt b/source/reference/command/collStats.txt index 58abb7cf644..0fd8d81617d 100644 --- a/source/reference/command/collStats.txt +++ b/source/reference/command/collStats.txt @@ -100,7 +100,7 @@ The following operation runs the :dbcommand:`collStats` command on the .. code-block:: javascript - db.runCommand( { collStats : "restaurants", scale: 1024 } ) + db.runCommand( { collStats : "restaurants", scale: 1024 } ) The following document provides a representation of the :dbcommand:`collStats` output. Depending on the configuration of your diff --git a/source/reference/command/currentOp.txt b/source/reference/command/currentOp.txt index e9deecc68ff..6b35b1c6f03 100644 --- a/source/reference/command/currentOp.txt +++ b/source/reference/command/currentOp.txt @@ -165,14 +165,14 @@ database ``db1`` that have been running longer than 3 seconds: .. code-block:: javascript - db.adminCommand( - { - currentOp: true, - "active" : true, - "secs_running" : { "$gt" : 3 }, - "ns" : /^db1\./ - } - ) + db.adminCommand( + { + currentOp: true, + "active" : true, + "secs_running" : { "$gt" : 3 }, + "ns" : /^db1\./ + } + ) .. _currentOp-cmd-index-creation: diff --git a/source/reference/command/dataSize.txt b/source/reference/command/dataSize.txt index 4dece3b0c3f..eee67ed19a0 100644 --- a/source/reference/command/dataSize.txt +++ b/source/reference/command/dataSize.txt @@ -102,7 +102,7 @@ and the upper bound of the key to be examined being ``{field: 100}``. .. code-block:: javascript - db.runCommand({ dataSize: "database.collection", keyPattern: { field: 1 }, min: { field: 10 }, max: { field: 100 } }) + db.runCommand({ dataSize: "database.collection", keyPattern: { field: 1 }, min: { field: 10 }, max: { field: 100 } }) This will return a document that contains the size of all matching documents. Replace ``database.collection`` value with database diff --git a/source/reference/command/findAndModify.txt b/source/reference/command/findAndModify.txt index f3515ea55d5..946183c034f 100644 --- a/source/reference/command/findAndModify.txt +++ b/source/reference/command/findAndModify.txt @@ -476,11 +476,11 @@ following form: .. code-block:: javascript - db.people.findAndModify( { - query: { name: "Tom", state: "active", rating: { $gt: 10 } }, - sort: { rating: 1 }, - update: { $inc: { score: 1 } } - } ); + db.people.findAndModify( { + query: { name: "Tom", state: "active", rating: { $gt: 10 } }, + sort: { rating: 1 }, + update: { $inc: { score: 1 } } + } ); However, the :method:`~db.collection.findAndModify()` shell helper method returns only the unmodified document, or if ``new`` is @@ -505,15 +505,15 @@ document or, if no matching document exists, create a new document: .. code-block:: javascript - db.runCommand( - { - findAndModify: "people", - query: { name: "Gus", state: "active", rating: 100 }, - sort: { rating: 1 }, - update: { $inc: { score: 1 } }, - upsert: true - } - ) + db.runCommand( + { + findAndModify: "people", + query: { name: "Gus", state: "active", rating: 100 }, + sort: { rating: 1 }, + update: { $inc: { score: 1 } }, + upsert: true + } + ) If the command finds a matching document, the command performs an update. diff --git a/source/reference/command/removeShard.txt b/source/reference/command/removeShard.txt index 05ce972c0ca..4eba7e35d61 100644 --- a/source/reference/command/removeShard.txt +++ b/source/reference/command/removeShard.txt @@ -25,7 +25,7 @@ against the ``admin`` database: .. code-block:: javascript - db.adminCommand( { removeShard : } ) + db.adminCommand( { removeShard : } ) Behavior -------- diff --git a/source/reference/command/usersInfo.txt b/source/reference/command/usersInfo.txt index beb9cbdbb50..8efeb439832 100644 --- a/source/reference/command/usersInfo.txt +++ b/source/reference/command/usersInfo.txt @@ -236,7 +236,7 @@ that resembles the following: .. code-block:: javascript - db.runCommand( { usersInfo: 1 } ) + db.runCommand( { usersInfo: 1 } ) When viewing all users, you can specify the ``showCredentials`` option but not the ``showPrivileges`` or the diff --git a/source/reference/command/validate.txt b/source/reference/command/validate.txt index ec7f514bef9..41d19b69496 100644 --- a/source/reference/command/validate.txt +++ b/source/reference/command/validate.txt @@ -100,7 +100,7 @@ Examples .. code-block:: javascript - db.runCommand( { validate: "myCollection", full: true } ) + db.runCommand( { validate: "myCollection", full: true } ) .. _validate-output: diff --git a/source/reference/installation-ubuntu-community-troubleshooting.txt b/source/reference/installation-ubuntu-community-troubleshooting.txt index 0e1dfdae5b3..b4b16a76c19 100644 --- a/source/reference/installation-ubuntu-community-troubleshooting.txt +++ b/source/reference/installation-ubuntu-community-troubleshooting.txt @@ -75,7 +75,7 @@ by running the following command in the terminal: .. code-block:: text - sudo apt-key list + sudo apt-key list The output should include an entry that resembles the following: diff --git a/source/reference/method/db.collection.bulkWrite.txt b/source/reference/method/db.collection.bulkWrite.txt index 57fa53a4b5b..a73f3c2dbe5 100644 --- a/source/reference/method/db.collection.bulkWrite.txt +++ b/source/reference/method/db.collection.bulkWrite.txt @@ -292,16 +292,16 @@ five operations. .. code-block:: javascript - db.collection.bulkWrite( - [ - { insertOne : }, - { updateOne : }, - { updateMany : }, - { replaceOne : }, - { deleteOne : }, - { deleteMany : } - ] - ) + db.collection.bulkWrite( + [ + { insertOne : }, + { updateOne : }, + { updateMany : }, + { replaceOne : }, + { deleteOne : }, + { deleteMany : } + ] + ) In the default ``ordered : true`` state, each operation will be executed in order, from the first operation ``insertOne`` @@ -316,17 +316,17 @@ The following code represents an unordered .. code-block:: javascript - db.collection.bulkWrite( - [ - { insertOne : }, - { updateOne : }, - { updateMany : }, - { replaceOne : }, - { deleteOne : }, - { deleteMany : } - ], - { ordered : false } - ) + db.collection.bulkWrite( + [ + { insertOne : }, + { updateOne : }, + { updateMany : }, + { replaceOne : }, + { deleteOne : }, + { deleteMany : } + ], + { ordered : false } + ) With ``ordered : false``, the results of the operation may vary. For example, the ``deleteOne`` or ``deleteMany`` may remove more or fewer documents diff --git a/source/reference/method/db.currentOp.txt b/source/reference/method/db.currentOp.txt index 8c4cab63559..54caadb3e13 100644 --- a/source/reference/method/db.currentOp.txt +++ b/source/reference/method/db.currentOp.txt @@ -202,13 +202,13 @@ database ``db1`` that have been running longer than 3 seconds: .. code-block:: javascript - db.currentOp( - { - "active" : true, - "secs_running" : { "$gt" : 3 }, - "ns" : /^db1\./ - } - ) + db.currentOp( + { + "active" : true, + "secs_running" : { "$gt" : 3 }, + "ns" : /^db1\./ + } + ) .. _currentOp-index-creation: diff --git a/source/reference/operator/aggregation/dateFromString.txt b/source/reference/operator/aggregation/dateFromString.txt index 4a8d1a27aa3..c72226dce17 100644 --- a/source/reference/operator/aggregation/dateFromString.txt +++ b/source/reference/operator/aggregation/dateFromString.txt @@ -207,16 +207,16 @@ to a date object: .. code-block:: javascript - db.logmessages.aggregate( [ { - $project: { - date: { - $dateFromString: { - dateString: '$date', - timezone: 'America/New_York' - } - } - } - } ] ) + db.logmessages.aggregate( [ { + $project: { + date: { + $dateFromString: { + dateString: '$date', + timezone: 'America/New_York' + } + } + } + } ] ) The above aggregation returns the following documents and converts each ``date`` field to the Eastern Time Zone: @@ -234,16 +234,16 @@ hard coded argument. For example: .. code-block:: javascript - db.logmessages.aggregate( [ { - $project: { - date: { - $dateFromString: { - dateString: '$date', - timezone: '$timezone' - } - } - } - } ] ) + db.logmessages.aggregate( [ { + $project: { + date: { + $dateFromString: { + dateString: '$date', + timezone: '$timezone' + } + } + } + } ] ) The above aggregation returns the following documents and converts each ``date`` field to their respective UTC representations. diff --git a/source/reference/operator/aggregation/match.txt b/source/reference/operator/aggregation/match.txt index 067f4c8bc88..864027b1574 100644 --- a/source/reference/operator/aggregation/match.txt +++ b/source/reference/operator/aggregation/match.txt @@ -126,10 +126,10 @@ the documents: .. code-block:: javascript - db.articles.aggregate( [ - { $match: { $or: [ { score: { $gt: 70, $lt: 90 } }, { views: { $gte: 1000 } } ] } }, - { $group: { _id: null, count: { $sum: 1 } } } - ] ); + db.articles.aggregate( [ + { $match: { $or: [ { score: { $gt: 70, $lt: 90 } }, { views: { $gte: 1000 } } ] } }, + { $group: { _id: null, count: { $sum: 1 } } } + ] ); In the aggregation pipeline, :pipeline:`$match` selects the documents where either the ``score`` is greater than ``70`` and less than ``90`` diff --git a/source/reference/operator/aggregation/range.txt b/source/reference/operator/aggregation/range.txt index 7ed3eb25553..95388e24ea4 100644 --- a/source/reference/operator/aggregation/range.txt +++ b/source/reference/operator/aggregation/range.txt @@ -104,13 +104,13 @@ the stopping points for each trip. .. code-block:: javascript - db.distances.aggregate([{ - $project: { - _id: 0, - city: 1, - "Rest stops": { $range: [ 0, "$distance", 25 ] } - } - }]) + db.distances.aggregate([{ + $project: { + _id: 0, + city: 1, + "Rest stops": { $range: [ 0, "$distance", 25 ] } + } + }]) The operation returns the following: diff --git a/source/reference/operator/aggregation/redact.txt b/source/reference/operator/aggregation/redact.txt index c75f21f3b0d..63eef95c63f 100644 --- a/source/reference/operator/aggregation/redact.txt +++ b/source/reference/operator/aggregation/redact.txt @@ -202,20 +202,20 @@ fields contained in a document/embedded document at level ``5``, include a .. code-block:: javascript - db.accounts.aggregate( - [ - { $match: { status: "A" } }, - { - $redact: { - $cond: { - if: { $eq: [ "$level", 5 ] }, - then: "$$PRUNE", - else: "$$DESCEND" - } - } - } - ] - ); + db.accounts.aggregate( + [ + { $match: { status: "A" } }, + { + $redact: { + $cond: { + if: { $eq: [ "$level", 5 ] }, + then: "$$PRUNE", + else: "$$DESCEND" + } + } + } + ] + ); The :pipeline:`$redact` stage evaluates the ``level`` field to determine access. If the ``level`` field equals ``5``, then exclude all diff --git a/source/reference/operator/aggregation/reduce.txt b/source/reference/operator/aggregation/reduce.txt index 44b32009d7b..38afb105389 100644 --- a/source/reference/operator/aggregation/reduce.txt +++ b/source/reference/operator/aggregation/reduce.txt @@ -273,36 +273,36 @@ The following example reduces the ``hobbies`` array of strings into a single str .. code-block:: javascript - db.people.aggregate( - [ - // Filter to return only non-empty arrays - { $match: { "hobbies": { $gt: [ ] } } }, - { - $project: { - "name": 1, - "bio": { - $reduce: { - input: "$hobbies", - initialValue: "My hobbies include:", - in: { - $concat: [ - "$$value", - { - $cond: { - if: { $eq: [ "$$value", "My hobbies include:" ] }, - then: " ", - else: ", " - } - }, - "$$this" - ] - } - } - } - } - } - ] - ) + db.people.aggregate( + [ + // Filter to return only non-empty arrays + { $match: { "hobbies": { $gt: [ ] } } }, + { + $project: { + "name": 1, + "bio": { + $reduce: { + input: "$hobbies", + initialValue: "My hobbies include:", + in: { + $concat: [ + "$$value", + { + $cond: { + if: { $eq: [ "$$value", "My hobbies include:" ] }, + then: " ", + else: ", " + } + }, + "$$this" + ] + } + } + } + } + } + ] + ) The operation returns the following: diff --git a/source/reference/operator/aggregation/subtract.txt b/source/reference/operator/aggregation/subtract.txt index 6eb48b826bf..5a5dbfc0111 100644 --- a/source/reference/operator/aggregation/subtract.txt +++ b/source/reference/operator/aggregation/subtract.txt @@ -52,7 +52,7 @@ subtotal of ``price`` and ``fee``. .. code-block:: javascript - db.sales.aggregate( [ { $project: { item: 1, total: { $subtract: [ { $add: [ "$price", "$fee" ] }, "$discount" ] } } } ] ) + db.sales.aggregate( [ { $project: { item: 1, total: { $subtract: [ { $add: [ "$price", "$fee" ] }, "$discount" ] } } } ] ) The operation returns the following results: @@ -70,7 +70,7 @@ in milliseconds: .. code-block:: javascript - db.sales.aggregate( [ { $project: { item: 1, dateDifference: { $subtract: [ new Date(), "$date" ] } } } ] ) + db.sales.aggregate( [ { $project: { item: 1, dateDifference: { $subtract: [ new Date(), "$date" ] } } } ] ) The operation returns the following results: @@ -88,7 +88,7 @@ field: .. code-block:: javascript - db.sales.aggregate( [ { $project: { item: 1, dateDifference: { $subtract: [ "$date", 5 * 60 * 1000 ] } } } ] ) + db.sales.aggregate( [ { $project: { item: 1, dateDifference: { $subtract: [ "$date", 5 * 60 * 1000 ] } } } ] ) The operation returns the following results: diff --git a/source/reference/operator/query/bitsAnySet.txt b/source/reference/operator/query/bitsAnySet.txt index ee661853977..a85169fe6b7 100644 --- a/source/reference/operator/query/bitsAnySet.txt +++ b/source/reference/operator/query/bitsAnySet.txt @@ -70,7 +70,7 @@ whether field ``a`` has any bits set at positions ``0``, ``1``, and ``5`` .. code-block:: javascript - db.collection.find( { a: { $bitsAnySet: 35 } } ) + db.collection.find( { a: { $bitsAnySet: 35 } } ) The query matches the following documents: diff --git a/source/reference/operator/query/jsonSchema.txt b/source/reference/operator/query/jsonSchema.txt index aa202b0c96a..0f6275f09b6 100644 --- a/source/reference/operator/query/jsonSchema.txt +++ b/source/reference/operator/query/jsonSchema.txt @@ -278,8 +278,8 @@ collection that satisfy the schema: .. code-block:: javascript - db.inventory.find( { $jsonSchema: myschema } ) - db.inventory.aggregate( [ { $match: { $jsonSchema: myschema } } ] ) + db.inventory.find( { $jsonSchema: myschema } ) + db.inventory.aggregate( [ { $match: { $jsonSchema: myschema } } ] ) You can use :query:`$jsonSchema` with the :query:`$nor` to find all documents that do not satisfy the schema: diff --git a/source/reference/operator/update/mul.txt b/source/reference/operator/update/mul.txt index da7f3647685..11694ea600f 100644 --- a/source/reference/operator/update/mul.txt +++ b/source/reference/operator/update/mul.txt @@ -130,10 +130,10 @@ that does not exist in the document: .. code-block:: javascript - db.products.update( - { _id: 2 }, - { $mul: { price: NumberLong(100) } } - ) + db.products.update( + { _id: 2 }, + { $mul: { price: NumberLong(100) } } + ) The operation results in the following document with a ``price`` field set to value 0 of numeric type :ref:`shell-type-long`, the same type as @@ -159,10 +159,10 @@ The following :method:`db.collection.update()` operation uses the .. code-block:: javascript - db.products.update( - { _id: 3 }, - { $mul: { price: NumberInt(5) } } - ) + db.products.update( + { _id: 3 }, + { $mul: { price: NumberInt(5) } } + ) The operation results in the following document: diff --git a/source/reference/operator/update/positional-all.txt b/source/reference/operator/update/positional-all.txt index e48ee8224df..74a54286673 100644 --- a/source/reference/operator/update/positional-all.txt +++ b/source/reference/operator/update/positional-all.txt @@ -59,11 +59,11 @@ array field: .. code-block:: javascript - db.collection.update( - { myArray: [ 5, 8 ] }, - { $set: { "myArray.$[]": 10 } }, - { upsert: true } - ) + db.collection.update( + { myArray: [ 5, 8 ] }, + { $set: { "myArray.$[]": 10 } }, + { upsert: true } + ) If no such document exists, the operation would result in an insertion of the following document: @@ -81,17 +81,17 @@ documents were found to update: .. code-block:: javascript - db.collection.update( - { myArray: 5 }, - { $set: { "myArray.$[]": 10 } }, - { upsert: true } - ) - - db.collection.update( - { }, - { $set: { "myArray.$[]": 10 } }, - { upsert: true } - ) + db.collection.update( + { myArray: 5 }, + { $set: { "myArray.$[]": 10 } }, + { upsert: true } + ) + + db.collection.update( + { }, + { $set: { "myArray.$[]": 10 } }, + { upsert: true } + ) Nested Arrays ~~~~~~~~~~~~~ diff --git a/source/release-notes/3.4-compatibility.txt b/source/release-notes/3.4-compatibility.txt index b9cbba5a08a..d38d6e3af12 100644 --- a/source/release-notes/3.4-compatibility.txt +++ b/source/release-notes/3.4-compatibility.txt @@ -303,10 +303,10 @@ is successful because of this behavior: .. code-block:: javascript - db.c.drop() - db.c.update( { a : { $in : [1] } }, { $addToSet : { a : 2 } }, { upsert : true } ) - db.c.find() - { "_id" : ObjectId("58bdb00eb39e8f87607e9222"), "a" : [ 2 ] } + db.c.drop() + db.c.update( { a : { $in : [1] } }, { $addToSet : { a : 2 } }, { upsert : true } ) + db.c.find() + { "_id" : ObjectId("58bdb00eb39e8f87607e9222"), "a" : [ 2 ] } In 3.4 and newer versions, however, a single-element :query:`$in` behaves like an equality statement for upserts. If the query includes this condition diff --git a/source/release-notes/4.0-upgrade-replica-set.txt b/source/release-notes/4.0-upgrade-replica-set.txt index eb00df10add..25faf2c396f 100644 --- a/source/release-notes/4.0-upgrade-replica-set.txt +++ b/source/release-notes/4.0-upgrade-replica-set.txt @@ -141,7 +141,7 @@ replica set member and check the ``featureCompatibilityVersion``: .. code-block:: javascript - db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } ) + db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } ) All members should return a result that includes ``"featureCompatibilityVersion" : { "version" : "3.6" }``. @@ -154,7 +154,7 @@ members must be available: .. code-block:: javascript - db.adminCommand( { setFeatureCompatibilityVersion: "3.6" } ) + db.adminCommand( { setFeatureCompatibilityVersion: "3.6" } ) For more information, see :dbcommand:`setFeatureCompatibilityVersion`. diff --git a/source/tutorial/configure-mongo-shell.txt b/source/tutorial/configure-mongo-shell.txt index 011af8b5e91..fb15a7a9448 100644 --- a/source/tutorial/configure-mongo-shell.txt +++ b/source/tutorial/configure-mongo-shell.txt @@ -55,11 +55,11 @@ To create a :binary:`~bin.mongo` shell prompt in the form of .. code-block:: javascript - host = db.serverStatus().host; + host = db.serverStatus().host; - prompt = function() { - return db+"@"+host+"$ "; - } + prompt = function() { + return db+"@"+host+"$ "; + } The prompt would then resemble the following: @@ -85,7 +85,7 @@ The prompt would then resemble the following: .. code-block:: javascript - Uptime:5897 Documents:6 > + Uptime:5897 Documents:6 > Use an External Editor in the ``mongo`` Shell --------------------------------------------- diff --git a/source/tutorial/deploy-sharded-cluster-with-keyfile-access-control.txt b/source/tutorial/deploy-sharded-cluster-with-keyfile-access-control.txt index 2c97959d21d..7c77c619b54 100644 --- a/source/tutorial/deploy-sharded-cluster-with-keyfile-access-control.txt +++ b/source/tutorial/deploy-sharded-cluster-with-keyfile-access-control.txt @@ -104,8 +104,8 @@ Create the Keyfile .. code-block:: shell - openssl rand -base64 756 > - chmod 400 + openssl rand -base64 756 > + chmod 400 See :ref:`internal-auth-keyfile` for additional details and requirements for using keyfiles. diff --git a/source/tutorial/enforce-keyfile-access-control-in-existing-sharded-cluster-no-downtime.txt b/source/tutorial/enforce-keyfile-access-control-in-existing-sharded-cluster-no-downtime.txt index 12a45b077fe..9dd8b2a907d 100644 --- a/source/tutorial/enforce-keyfile-access-control-in-existing-sharded-cluster-no-downtime.txt +++ b/source/tutorial/enforce-keyfile-access-control-in-existing-sharded-cluster-no-downtime.txt @@ -103,8 +103,8 @@ Create and Distribute the Keyfile .. code-block:: shell - openssl rand -base64 755 > - chmod 400 + openssl rand -base64 755 > + chmod 400 .. include:: /includes/extracts/keyfile-distribution-sharded-cluster.rst @@ -160,17 +160,17 @@ roles: .. code-block:: javascript - admin = db.getSiblingDB("admin") - admin.createUser( - { - user: "admin", - pwd: "", - roles: [ - { role: "clusterAdmin", db: "admin" }, - { role: "userAdmin", db: "admin" } - ] - } - ) + admin = db.getSiblingDB("admin") + admin.createUser( + { + user: "admin", + pwd: "", + roles: [ + { role: "clusterAdmin", db: "admin" }, + { role: "userAdmin", db: "admin" } + ] + } + ) At the completion of this tutorial, if you want to connect to the shard to perform maintenance operation that require direct connection to a