From 30394c334de891418a24555b2d0a748aaec6f67b Mon Sep 17 00:00:00 2001 From: Andrew Feierabend Date: Tue, 6 Apr 2021 14:01:20 -0400 Subject: [PATCH] DOCSP-15360, DOCSP-15404 foreport code block bash part1 --- source/core/index-wildcard.txt | 2 +- source/core/security-ldap-external.txt | 4 ++-- ...ts-client-side-field-level-encryption.yaml | 4 ++-- .../includes/extracts-wildcard-indexes.yaml | 4 ++-- .../steps-4.2-downgrade-replica-set.yaml | 2 +- .../steps-4.2-downgrade-sharded-cluster.yaml | 2 +- .../steps-4.4-downgrade-replica-set.yaml | 2 +- .../steps-4.4-downgrade-sharded-cluster.yaml | 2 +- .../steps-configure-ldap-mongodb.yaml | 2 +- ...p-sasl-activedirectory-authentication.yaml | 4 ++-- .../steps-csfle-shell-aws-create-key.yaml | 2 +- .../steps-csfle-shell-azure-create-key.yaml | 2 +- .../steps-csfle-shell-gcp-create-key.yaml | 2 +- .../steps-csfle-shell-local-create-key.yaml | 4 ++-- ...n-shardcluster-nodowntime-auth-mongos.yaml | 2 +- ...dcluster-nodowntime-transition-config.yaml | 4 ++-- ...dcluster-nodowntime-transition-mongos.yaml | 2 +- ...eps-install-mongodb-on-amazon-tarball.yaml | 6 ++--- ...s-kerberos-auth-activedirectory-authz.yaml | 10 ++++---- ...re-sharded-config-primary-from-backup.yaml | 2 +- ...ore-sharded-shard-primary-from-backup.yaml | 2 +- .../steps-run-mongodb-on-windows.yaml | 2 +- source/reference/command/createIndexes.txt | 16 ++++++------- source/reference/configuration-options.txt | 4 ++-- source/reference/expansion-directives.txt | 2 +- source/reference/limits.txt | 2 +- source/reference/log-messages.txt | 24 +++++++++---------- .../method/ClientEncryption.decrypt.txt | 2 +- .../method/ClientEncryption.encrypt.txt | 2 +- source/reference/method/Mongo.txt | 4 ++-- .../method/cursor.noCursorTimeout.txt | 2 +- .../method/db.collection.createIndex.txt | 16 ++++++------- .../method/db.collection.createIndexes.txt | 16 ++++++------- .../reference/method/getClientEncryption.txt | 2 +- source/reference/method/rs.reconfig.txt | 2 +- .../reference/operator/aggregation/acos.txt | 14 +++++------ .../reference/operator/aggregation/acosh.txt | 14 +++++------ .../reference/operator/aggregation/asin.txt | 14 +++++------ .../reference/operator/aggregation/asinh.txt | 12 +++++----- .../reference/operator/aggregation/atan.txt | 12 +++++----- .../reference/operator/aggregation/atan2.txt | 12 +++++----- .../reference/operator/aggregation/atanh.txt | 14 +++++------ source/reference/operator/aggregation/cos.txt | 14 +++++------ .../operator/aggregation/degreesToRadians.txt | 4 ++-- .../operator/aggregation/radiansToDegrees.txt | 4 ++-- source/reference/operator/aggregation/sin.txt | 14 +++++------ source/reference/operator/aggregation/tan.txt | 14 +++++------ source/reference/program/mongod.txt | 6 ++--- source/reference/program/mongokerberos.txt | 4 ++-- source/reference/program/mongoldap.txt | 8 +++---- ...uthenticate-nativeldap-activedirectory.txt | 4 ++-- source/tutorial/change-oplog-size.txt | 2 +- ...figure-a-non-voting-replica-set-member.txt | 2 +- ...ed-cluster-with-keyfile-access-control.txt | 2 +- ...n-existing-sharded-cluster-no-downtime.txt | 2 +- .../kerberos-auth-activedirectory-authz.txt | 4 ++-- source/tutorial/restore-sharded-cluster.txt | 2 +- 57 files changed, 170 insertions(+), 170 deletions(-) diff --git a/source/core/index-wildcard.txt b/source/core/index-wildcard.txt index f5fa59d4e1f..6984b31c9ad 100644 --- a/source/core/index-wildcard.txt +++ b/source/core/index-wildcard.txt @@ -92,7 +92,7 @@ The following operation creates a wildcard index on the The wildcard index can support arbitrary single-field queries on ``product_attributes`` or its embedded fields: -.. code-block:: shell +.. code-block:: bash :copyable: false db.products_catalog.find( { "product_attributes.size.length" : { $gt : 60 } } ) diff --git a/source/core/security-ldap-external.txt b/source/core/security-ldap-external.txt index 6d6ba7c53bc..7c5d4cb87ab 100644 --- a/source/core/security-ldap-external.txt +++ b/source/core/security-ldap-external.txt @@ -343,7 +343,7 @@ Design the query template to retrieve the user's groups. or methodology for tracking group membership. This query also assumes the user authenticates using their full LDAP DN as their username. - .. code-block:: shell + .. code-block:: bash "{USER}?memberOf?base" @@ -429,7 +429,7 @@ along with any other options relevant to your deployment. For example, the following operation authenticates to a MongoDB server running with LDAP authentication and authorization: -.. code-block:: shell +.. code-block:: bash mongo --username alice@dba.example.com --password --authenticationDatabase '$external' --authenticationMechanism "PLAIN" --host "mongodb.example.com" --port 27017 diff --git a/source/includes/extracts-client-side-field-level-encryption.yaml b/source/includes/extracts-client-side-field-level-encryption.yaml index 6bcce6d94fb..02462e29cb5 100644 --- a/source/includes/extracts-client-side-field-level-encryption.yaml +++ b/source/includes/extracts-client-side-field-level-encryption.yaml @@ -55,7 +55,7 @@ content: | ``AWS_SECRET_ACCESS_KEY`` environment variables into local variables in the :binary:`~bin.mongo` shell: - .. code-block:: shell + .. code-block:: bash mongo --eval " var AWS_ACCESS_KEY_ID = '$AWS_ACCESS_KEY_ID' @@ -77,7 +77,7 @@ content: | a key that meets the stated requirements and loads it into the :binary:`~bin.mongo` shell: - .. code-block:: shell + .. code-block:: bash :emphasize-lines: 1 TEST_LOCAL_KEY=$(echo "$(head -c 96 /dev/urandom | base64 | tr -d '\n')") diff --git a/source/includes/extracts-wildcard-indexes.yaml b/source/includes/extracts-wildcard-indexes.yaml index affeb7612ab..dd868e7f6db 100644 --- a/source/includes/extracts-wildcard-indexes.yaml +++ b/source/includes/extracts-wildcard-indexes.yaml @@ -52,13 +52,13 @@ content: | ``userMetadata.likes``, ``userMetadata.dislikes``, and ``userMetadata.age``: - .. code-block:: shell + .. code-block:: bash db.userData.createIndex( { "userMetadata.$**" : 1 } ) The index can support the following queries: - .. code-block:: shell + .. code-block:: bash :copyable: false db.userData.find({ "userMetadata.likes" : "dogs" }) diff --git a/source/includes/steps-4.2-downgrade-replica-set.yaml b/source/includes/steps-4.2-downgrade-replica-set.yaml index e1795b95767..a77cd05164f 100644 --- a/source/includes/steps-4.2-downgrade-replica-set.yaml +++ b/source/includes/steps-4.2-downgrade-replica-set.yaml @@ -61,7 +61,7 @@ content: | :option:`--dbpath ` command line option specify the data directory of the arbiter :binary:`~bin.mongod`. - .. code-block:: shell + .. code-block:: bash rm -rf /path/to/mongodb/datafiles/* diff --git a/source/includes/steps-4.2-downgrade-sharded-cluster.yaml b/source/includes/steps-4.2-downgrade-sharded-cluster.yaml index e793a303705..ef7fd1ae3ed 100644 --- a/source/includes/steps-4.2-downgrade-sharded-cluster.yaml +++ b/source/includes/steps-4.2-downgrade-sharded-cluster.yaml @@ -99,7 +99,7 @@ content: | :option:`--dbpath ` command line option specify the data directory of the arbiter :binary:`~bin.mongod`. - .. code-block:: shell + .. code-block:: bash rm -rf /path/to/mongodb/datafiles/* diff --git a/source/includes/steps-4.4-downgrade-replica-set.yaml b/source/includes/steps-4.4-downgrade-replica-set.yaml index 9f9fca98817..40a3fc86c80 100644 --- a/source/includes/steps-4.4-downgrade-replica-set.yaml +++ b/source/includes/steps-4.4-downgrade-replica-set.yaml @@ -45,7 +45,7 @@ content: | :option:`--dbpath ` command line option specify the data directory of the arbiter :binary:`~bin.mongod`. - .. code-block:: shell + .. code-block:: bash rm -rf /path/to/mongodb/datafiles/* diff --git a/source/includes/steps-4.4-downgrade-sharded-cluster.yaml b/source/includes/steps-4.4-downgrade-sharded-cluster.yaml index f802eca3280..3a77c5fd097 100644 --- a/source/includes/steps-4.4-downgrade-sharded-cluster.yaml +++ b/source/includes/steps-4.4-downgrade-sharded-cluster.yaml @@ -79,7 +79,7 @@ content: | :option:`--dbpath ` command line option specify the data directory of the arbiter :binary:`~bin.mongod`. - .. code-block:: shell + .. code-block:: bash rm -rf /path/to/mongodb/datafiles/* diff --git a/source/includes/steps-configure-ldap-mongodb.yaml b/source/includes/steps-configure-ldap-mongodb.yaml index 5f6da08b26c..0686ba5c5fb 100644 --- a/source/includes/steps-configure-ldap-mongodb.yaml +++ b/source/includes/steps-configure-ldap-mongodb.yaml @@ -96,7 +96,7 @@ content: | options, substituting ```` and ````, and enter your password when prompted: - .. code-block:: shell + .. code-block:: bash mongo --host --authenticationMechanism PLAIN --authenticationDatabase '$external' -u -p diff --git a/source/includes/steps-configure-ldap-sasl-activedirectory-authentication.yaml b/source/includes/steps-configure-ldap-sasl-activedirectory-authentication.yaml index 6dc819a0e27..08df8997d89 100644 --- a/source/includes/steps-configure-ldap-sasl-activedirectory-authentication.yaml +++ b/source/includes/steps-configure-ldap-sasl-activedirectory-authentication.yaml @@ -261,7 +261,7 @@ pre: | MongoDB server is currently running, make the appropriate preparations to stop the server. - .. code-block:: shell + .. code-block:: bash mongod --config @@ -299,7 +299,7 @@ pre: | `, you can authenticate as the user ``sam@dba.example.com`` and receive the required permissions. - .. code-block:: shell + .. code-block:: bash mongo --username sam@DBA.EXAMPLE.COM --password --authenticationMechanism 'PLAIN' --authenticationDatabase '$external' --host --port diff --git a/source/includes/steps-csfle-shell-aws-create-key.yaml b/source/includes/steps-csfle-shell-aws-create-key.yaml index 3f087351235..bed2d4f436d 100644 --- a/source/includes/steps-csfle-shell-aws-create-key.yaml +++ b/source/includes/steps-csfle-shell-aws-create-key.yaml @@ -23,7 +23,7 @@ content: | :option:`--eval `, :option:`--shell `, and :option:`--nodb ` options: - .. code-block:: shell + .. code-block:: bash mongo --eval " var AWS_ACCESS_KEY_ID = '$AWS_ACCESS_KEY_ID' diff --git a/source/includes/steps-csfle-shell-azure-create-key.yaml b/source/includes/steps-csfle-shell-azure-create-key.yaml index 0ad590e4702..bb5d19330de 100644 --- a/source/includes/steps-csfle-shell-azure-create-key.yaml +++ b/source/includes/steps-csfle-shell-azure-create-key.yaml @@ -22,7 +22,7 @@ content: | :option:`--eval `, :option:`--shell `, and :option:`--nodb ` options: - .. code-block:: shell + .. code-block:: bash mongo --eval " var AZURE_TENANT_ID = '$AZURE_TENANT_ID' diff --git a/source/includes/steps-csfle-shell-gcp-create-key.yaml b/source/includes/steps-csfle-shell-gcp-create-key.yaml index 8d998874397..ff865a9d3b0 100644 --- a/source/includes/steps-csfle-shell-gcp-create-key.yaml +++ b/source/includes/steps-csfle-shell-gcp-create-key.yaml @@ -21,7 +21,7 @@ content: | :option:`--eval `, :option:`--shell `, and :option:`--nodb ` options: - .. code-block:: shell + .. code-block:: bash mongo --eval " var GCP_EMAIL = '$GCP_EMAIL' diff --git a/source/includes/steps-csfle-shell-local-create-key.yaml b/source/includes/steps-csfle-shell-local-create-key.yaml index 7c5e6c55998..f9f46c95a8b 100644 --- a/source/includes/steps-csfle-shell-local-create-key.yaml +++ b/source/includes/steps-csfle-shell-local-create-key.yaml @@ -16,7 +16,7 @@ content: | requirements and adds it to the user's ``~/.profile``. If the key ``DEV_LOCAL_KEY`` already exists, skip this operation. - .. code-block:: shell + .. code-block:: bash echo "export DEV_LOCAL_KEY=\"$(head -c 96 /dev/urandom | base64 | tr -d '\n')\"" >> ~/.profile @@ -41,7 +41,7 @@ content: | `, :option:`--shell `, and :option:`--nodb ` options: - .. code-block:: shell + .. code-block:: bash mongo --eval "var LOCAL_KEY = '$DEV_LOCAL_KEY' " \ --shell --nodb diff --git a/source/includes/steps-enable-authentication-in-shardcluster-nodowntime-auth-mongos.yaml b/source/includes/steps-enable-authentication-in-shardcluster-nodowntime-auth-mongos.yaml index e439ffc6865..a3eca86fb9e 100644 --- a/source/includes/steps-enable-authentication-in-shardcluster-nodowntime-auth-mongos.yaml +++ b/source/includes/steps-enable-authentication-in-shardcluster-nodowntime-auth-mongos.yaml @@ -43,7 +43,7 @@ pre: | :option:`--config `. For example, if the updated configuration file were named ``mongos-secure.conf``: - .. code-block:: shell + .. code-block:: bash mongos --config /mongos-secure.conf diff --git a/source/includes/steps-enable-authentication-in-shardcluster-nodowntime-transition-config.yaml b/source/includes/steps-enable-authentication-in-shardcluster-nodowntime-transition-config.yaml index 44ce8d76bf8..937e9647d68 100644 --- a/source/includes/steps-enable-authentication-in-shardcluster-nodowntime-transition-config.yaml +++ b/source/includes/steps-enable-authentication-in-shardcluster-nodowntime-transition-config.yaml @@ -56,7 +56,7 @@ pre: | using :option:`--config `. For example, if the new configuration file were named ``mongod-secure.conf``: - .. code-block:: shell + .. code-block:: bash mongod --config /mongod-secure.conf @@ -93,7 +93,7 @@ pre: | :option:`--config `. For example, if the new configuration file were named ``mongod-secure.conf``: - .. code-block:: shell + .. code-block:: bash mongod --config /mongod-secure.conf diff --git a/source/includes/steps-enable-authentication-in-shardcluster-nodowntime-transition-mongos.yaml b/source/includes/steps-enable-authentication-in-shardcluster-nodowntime-transition-mongos.yaml index 64dca53d964..e6f5ea77c30 100644 --- a/source/includes/steps-enable-authentication-in-shardcluster-nodowntime-transition-mongos.yaml +++ b/source/includes/steps-enable-authentication-in-shardcluster-nodowntime-transition-mongos.yaml @@ -64,7 +64,7 @@ pre: | :option:`--config `. For example, if the {{status}} configuration file were named ``mongos-secure.conf``: - .. code-block:: shell + .. code-block:: bash mongos --config /mongos-secure.conf diff --git a/source/includes/steps-install-mongodb-on-amazon-tarball.yaml b/source/includes/steps-install-mongodb-on-amazon-tarball.yaml index 6f0cdfca652..dec0c750b6c 100644 --- a/source/includes/steps-install-mongodb-on-amazon-tarball.yaml +++ b/source/includes/steps-install-mongodb-on-amazon-tarball.yaml @@ -21,7 +21,7 @@ pre: | be sure to modify the command to reflect the correct ``.tgz`` file name. - .. code-block:: shell + .. code-block:: bash tar -zxvf mongodb-linux-x86_64-*-{+release+}.tgz @@ -40,7 +40,7 @@ content: | - Copy the binaries into ``/usr/bin/``. - .. code-block:: shell + .. code-block:: bash sudo cp /bin/* /usr/bin/ @@ -48,7 +48,7 @@ content: | - Create symbolic links to each of these binaries to ``/usr/bin/``: - .. code-block:: shell + .. code-block:: bash sudo ln -s /full/path/to//bin/* /usr/bin/ diff --git a/source/includes/steps-kerberos-auth-activedirectory-authz.yaml b/source/includes/steps-kerberos-auth-activedirectory-authz.yaml index ae659047447..82dd729b6dc 100644 --- a/source/includes/steps-kerberos-auth-activedirectory-authz.yaml +++ b/source/includes/steps-kerberos-auth-activedirectory-authz.yaml @@ -95,7 +95,7 @@ pre: | Connect to the MongoDB server using the :binary:`~bin.mongo` shell using the :option:`--host ` and :option:`--port ` options. - .. code-block:: shell + .. code-block:: bash mongo --host --port @@ -106,7 +106,7 @@ pre: | :option:`--authenticationMechanism ` for the MongoDB server's configured authentication mechanism. - .. code-block:: shell + .. code-block:: bash mongo --host --port --username --password --authenticationDatabase="admin" --authenticationMechanism="" @@ -450,7 +450,7 @@ pre: | On Linux, you must specify the ``KRB5_KTNAME`` environmental variable, specifying the path to the keytab file for the MongoDB server. - .. code-block:: shell + .. code-block:: bash env KRB5_KTNAME mongod --config @@ -460,7 +460,7 @@ pre: | On :abbr:`Windows (Microsoft Windows)`, you must start the MongoDB server as the service principal account as configured earlier in the procedure: - .. code-block:: shell + .. code-block:: bash mongod.exe --config @@ -495,7 +495,7 @@ pre: | `, you can authenticate as the user ``sam@dba.example.com`` and receive the required permissions. - .. code-block:: shell + .. code-block:: bash mongo --username sam@DBA.EXAMPLE.COM --password --authenticationMechanisms="GSSAPI" --authenticationDatabase "$external" --host --port diff --git a/source/includes/steps-restore-sharded-config-primary-from-backup.yaml b/source/includes/steps-restore-sharded-config-primary-from-backup.yaml index 6ac3bfb9d3d..aa8b5085332 100644 --- a/source/includes/steps-restore-sharded-config-primary-from-backup.yaml +++ b/source/includes/steps-restore-sharded-config-primary-from-backup.yaml @@ -20,7 +20,7 @@ content: | :doc:`/tutorial/backup-with-filesystem-snapshots` procedure. - .. code-block:: shell + .. code-block:: bash lvcreate --size 250GB --name mongod-datafiles-snapshot vg0 gzip -d -c mongod-datafiles-snapshot.gz | dd o/dev/vg0/mongod-datafiles-snapshot diff --git a/source/includes/steps-restore-sharded-shard-primary-from-backup.yaml b/source/includes/steps-restore-sharded-shard-primary-from-backup.yaml index 3e4b4b92b46..1378e525a77 100644 --- a/source/includes/steps-restore-sharded-shard-primary-from-backup.yaml +++ b/source/includes/steps-restore-sharded-shard-primary-from-backup.yaml @@ -21,7 +21,7 @@ content: | :doc:`/tutorial/backup-with-filesystem-snapshots` procedure. - .. code-block:: shell + .. code-block:: bash lvcreate --size 250GB --name mongod-datafiles-snapshot vg0 gzip -d -c mongod-datafiles-snapshot.gz | dd o/dev/vg0/mongod-datafiles-snapshot diff --git a/source/includes/steps-run-mongodb-on-windows.yaml b/source/includes/steps-run-mongodb-on-windows.yaml index f039d39725f..101dafbee11 100644 --- a/source/includes/steps-run-mongodb-on-windows.yaml +++ b/source/includes/steps-run-mongodb-on-windows.yaml @@ -32,7 +32,7 @@ content: | If the MongoDB database server is running correctly, the :guilabel:`Command Interpreter` displays: - .. code-block:: shell + .. code-block:: bash [initandlisten] waiting for connections diff --git a/source/reference/command/createIndexes.txt b/source/reference/command/createIndexes.txt index b36f6aafcdb..df73ec24136 100644 --- a/source/reference/command/createIndexes.txt +++ b/source/reference/command/createIndexes.txt @@ -778,7 +778,7 @@ Create a Wildcard Index on a Single Field Path The following operation creates a wildcard index on the ``product_attributes`` field: -.. code-block:: shell +.. code-block:: bash use inventory db.runCommand( @@ -801,7 +801,7 @@ fields in the document/array. The wildcard index can support arbitrary single-field queries on ``product_attributes`` or one of its nested fields: -.. code-block:: shell +.. code-block:: bash db.products_catalog.find( { "product_attributes.superFlight" : true } ) db.products_catalog.find( { "product_attributes.maxSpeed" : { $gt : 20 } } ) @@ -825,7 +825,7 @@ Create a Wildcard Index on All Field Paths The following operation creates a wildcard index on all scalar fields (excluding the ``_id`` field): -.. code-block:: shell +.. code-block:: bash use inventory db.runCommand( @@ -848,7 +848,7 @@ all scalar fields in the document/array. The created index can support queries on any arbitrary field within documents in the collection: -.. code-block:: shell +.. code-block:: bash db.products_catalog.find( { "product_price" : { $lt : 25 } } ) db.products_catalog.find( { "product_attributes.elements" : { $eq: "water" } } ) @@ -874,7 +874,7 @@ the ``wildcardProjection`` option to include only scalar values of the ``product_attributes.elements`` and ``product_attributes.resistance`` fields in the index. -.. code-block:: shell +.. code-block:: bash use inventory db.runCommand( @@ -904,7 +904,7 @@ the document/array. The created index can support queries on any scalar field included in the ``wildcardProjection``: -.. code-block:: shell +.. code-block:: bash db.products_catalog.find( { "product_attributes.elements" : { $eq: "Water" } } ) db.products_catalog.find( { "product_attributes.resistance" : "Bludgeoning" } ) @@ -926,7 +926,7 @@ for each document in the collection, *excluding* the ``product_attributes.elements`` and ``product_attributes.resistance`` fields: -.. code-block:: shell +.. code-block:: bash use inventory db.runCommand( @@ -956,7 +956,7 @@ the document/array. The created index can support queries on any scalar field **except** those excluded by ``wildcardProjection``: -.. code-block:: shell +.. code-block:: bash db.products_catalog.find( { "product_attributes.maxSpeed" : { $gt: 25 } } ) db.products_catalog.find( { "product_attributes.superStrength" : true } ) diff --git a/source/reference/configuration-options.txt b/source/reference/configuration-options.txt index 1cc185d3896..da6c8cf83db 100644 --- a/source/reference/configuration-options.txt +++ b/source/reference/configuration-options.txt @@ -3302,7 +3302,7 @@ Key Management Configuration Options When constructing the query URL, ensure that the order of LDAP parameters respects RFC4516: - .. code-block:: shell + .. code-block:: bash [ dn [ ? [attributes] [ ? [scope] [ ? [filter] [ ? [Extensions] ] ] ] ] ] @@ -3323,7 +3323,7 @@ Key Management Configuration Options This LDAP query returns any groups listed in the LDAP user object's ``memberOf`` attribute. - .. code-block:: shell + .. code-block:: bash "{USER}?memberOf?base" diff --git a/source/reference/expansion-directives.txt b/source/reference/expansion-directives.txt index 6d998bb4727..5870dd53882 100644 --- a/source/reference/expansion-directives.txt +++ b/source/reference/expansion-directives.txt @@ -55,7 +55,7 @@ To use expansion directives, you must specify the :option:`--configExpand ` command-line option with the complete list of expansion directives used: -.. code-block:: shell +.. code-block:: bash mongod --config "/path/to/config/mongod.conf" --configExpand "rest,exec" diff --git a/source/reference/limits.txt b/source/reference/limits.txt index 3ee46cea7d5..d5aa20d7a10 100644 --- a/source/reference/limits.txt +++ b/source/reference/limits.txt @@ -499,7 +499,7 @@ Sessions refresh the session using the :dbcommand:`refreshSessions` command. For example: - .. code-block:: shell + .. code-block:: bash var session = db.getMongo().startSession() var sessionId = session.getSessionId().id diff --git a/source/reference/log-messages.txt b/source/reference/log-messages.txt index 426de609eac..b87d6e7ef28 100644 --- a/source/reference/log-messages.txt +++ b/source/reference/log-messages.txt @@ -897,7 +897,7 @@ Counting Unique Messages The following example shows the top 10 unique message values in a given log file, sorted by frequency: -.. code-block:: shell +.. code-block:: bash jq -r ".msg" /var/log/mongodb/mongod.log | sort | uniq -c | sort -rn | head -10 @@ -908,7 +908,7 @@ in the attribute object. The following counts all unique connections over the course of the log file and presents them in descending order by number of occurrences: -.. code-block:: shell +.. code-block:: bash jq -r '.attr.remote' /var/log/mongodb/mongod.log | grep -v 'null' | sort | uniq -c | sort -r @@ -917,7 +917,7 @@ different ports, are treated as different connections by this command. You could limit output to consider IP addresses only, with the following change: -.. code-block:: shell +.. code-block:: bash jq -r '.attr.remote' /var/log/mongodb/mongod.log | grep -v 'null' | awk -F':' '{print $1}' | sort | uniq -c | sort -r @@ -929,7 +929,7 @@ The following example counts all remote `MongoDB driver presents each driver type and version in descending order by number of occurrences: -.. code-block:: shell +.. code-block:: bash jq -cr '.attr.doc.driver' /var/log/mongodb/mongod.log | grep -v null | sort | uniq -c | sort -rn @@ -943,7 +943,7 @@ connections and client applications, including the :binary:`~bin.mongo` shell, and prints a total for each unique operating system type that connected, sorted by frequency: -.. code-block:: shell +.. code-block:: bash jq -r '.attr.doc.os.type' /var/log/mongodb/mongod.log | grep -v null | sort | uniq -c | sort -rn @@ -957,7 +957,7 @@ With :ref:`slow operation logging ` enabled, the following returns only the slow operations that took above 2000 milliseconds:, for further analysis: -.. code-block:: shell +.. code-block:: bash jq '. | select(.attr.durationMillis>=2000)' /var/log/mongodb/mongod.log @@ -978,14 +978,14 @@ relevant events. The following example prints only the log messages of :ref:`component ` type **REPL**: -.. code-block:: shell +.. code-block:: bash jq '. | select(.c=="REPL")' /var/log/mongodb/mongod.log The following example prints all log messages *except* those of :ref:`component ` type **REPL**: -.. code-block:: shell +.. code-block:: bash jq '. | select(.c!="REPL")' /var/log/mongodb/mongod.log @@ -993,7 +993,7 @@ The following example print log messages of :ref:`component ` type **REPL** *or* **STORAGE**: -.. code-block:: shell +.. code-block:: bash jq '. | select( .c as $c | ["REPL", "STORAGE"] | index($c) )' /var/log/mongodb/mongod.log @@ -1022,7 +1022,7 @@ respectively. You could then filter your log output to show only these log IDs, effectively showing only client connection activity, using the following ``jq`` syntax: -.. code-block:: shell +.. code-block:: bash jq '. | select( .id as $id | [22943, 22944] | index($id) )' /var/log/mongodb/mongod.log @@ -1038,7 +1038,7 @@ Log output can be further refined by filtering on the timestamp field, limiting log entires returned to a specific date range. For example, the following returns all log entries that occurred on April 15th, 2020: -.. code-block:: shell +.. code-block:: bash jq '. | select(.t["$date"] >= "2020-04-15T00:00:00.000" and .t["$date"] <= "2020-04-15T23:59:59.999")' /var/log/mongodb/mongod.log @@ -1050,7 +1050,7 @@ creating weekly reports or yearly summaries for example. The following syntax expands the "Monitoring Connections" example from earlier to limit results to the month of May, 2020: -.. code-block:: shell +.. code-block:: bash jq '. | select(.t["$date"] >= "2020-05-01T00:00:00.000" and .t["$date"] <= "2020-05-31T23:59:59.999" and .attr.remote)' /var/log/mongodb/mongod.log diff --git a/source/reference/method/ClientEncryption.decrypt.txt b/source/reference/method/ClientEncryption.decrypt.txt index a4a979c31dd..04c83c58f81 100644 --- a/source/reference/method/ClientEncryption.decrypt.txt +++ b/source/reference/method/ClientEncryption.decrypt.txt @@ -20,7 +20,7 @@ ClientEncryption.decrypt() :method:`~ClientEncryption.decrypt` has the following syntax: - .. code-block:: shell + .. code-block:: bash clientEncryption = db.getMongo().getClientEncryption() diff --git a/source/reference/method/ClientEncryption.encrypt.txt b/source/reference/method/ClientEncryption.encrypt.txt index 57595b7d422..49888318cc0 100644 --- a/source/reference/method/ClientEncryption.encrypt.txt +++ b/source/reference/method/ClientEncryption.encrypt.txt @@ -21,7 +21,7 @@ ClientEncryption.encrypt() :method:`~ClientEncryption.encrypt` has the following syntax: - .. code-block:: shell + .. code-block:: bash clientEncryption = db.getMongo().getClientEncryption() diff --git a/source/reference/method/Mongo.txt b/source/reference/method/Mongo.txt index a96d3e85679..9d43f4bb85e 100644 --- a/source/reference/method/Mongo.txt +++ b/source/reference/method/Mongo.txt @@ -286,7 +286,7 @@ base64-encoded 96-byte string with no line breaks. The following operation generates a key that meets the stated requirements and loads it into the :binary:`~bin.mongo` shell: -.. code-block:: shell +.. code-block:: bash :emphasize-lines: 1 TEST_LOCAL_KEY=$(echo "$(head -c 96 /dev/urandom | base64 | tr -d '\n')") @@ -347,7 +347,7 @@ base64-encoded 96-byte string with no line breaks. The following operation generates a key that meets the stated requirements and loads it into the :binary:`~bin.mongo` shell: -.. code-block:: shell +.. code-block:: bash :emphasize-lines: 1 TEST_LOCAL_KEY=$(echo "$(head -c 96 /dev/urandom | base64 | tr -d '\n')") diff --git a/source/reference/method/cursor.noCursorTimeout.txt b/source/reference/method/cursor.noCursorTimeout.txt index 600a552251f..ab581450cf4 100644 --- a/source/reference/method/cursor.noCursorTimeout.txt +++ b/source/reference/method/cursor.noCursorTimeout.txt @@ -48,7 +48,7 @@ longer than 30 minutes, issue the operation within an explicit session using :method:`Mongo.startSession()` and periodically refresh the session using the :dbcommand:`refreshSessions` command. For example: -.. code-block:: shell +.. code-block:: bash var session = db.getMongo().startSession() var sessionId = session.getSessionId().id diff --git a/source/reference/method/db.collection.createIndex.txt b/source/reference/method/db.collection.createIndex.txt index ff93188f093..d5f8f7984d7 100644 --- a/source/reference/method/db.collection.createIndex.txt +++ b/source/reference/method/db.collection.createIndex.txt @@ -855,7 +855,7 @@ Create a Wildcard Index on a Single Field Path The following operation creates a wildcard index on the ``product_attributes`` field: -.. code-block:: shell +.. code-block:: bash use inventory db.products_catalog.createIndex( { "product_attributes.$**" : 1 } ) @@ -868,7 +868,7 @@ fields in the document/array. The wildcard index can support arbitrary single-field queries on ``product_attributes`` or one of its nested fields: -.. code-block:: shell +.. code-block:: bash db.products_catalog.find( { "product_attributes.superFlight" : true } ) db.products_catalog.find( { "product_attributes.maxSpeed" : { $gt : 20 } } ) @@ -892,7 +892,7 @@ Create a Wildcard Index on All Field Paths The following operation creates a wildcard index on all scalar fields (excluding the ``_id`` field): -.. code-block:: shell +.. code-block:: bash use inventory db.products_catalog.createIndex( { "$**" : 1 } ) @@ -905,7 +905,7 @@ all scalar fields in the document/array. The created index can support queries on any arbitrary field within documents in the collection: -.. code-block:: shell +.. code-block:: bash db.products_catalog.find( { "product_price" : { $lt : 25 } } ) db.products_catalog.find( { "product_attributes.elements" : { $eq: "water" } } ) @@ -932,7 +932,7 @@ the ``wildcardProjection`` option to include only scalar values of the ``product_attributes.elements`` and ``product_attributes.resistance`` fields in the index. -.. code-block:: shell +.. code-block:: bash use inventory db.products_catalog.createIndex( @@ -957,7 +957,7 @@ the document/array. The created index can support queries on any scalar field included in the ``wildcardProjection``: -.. code-block:: shell +.. code-block:: bash db.products_catalog.find( { "product_attributes.elements" : { $eq: "Water" } } ) db.products_catalog.find( { "product_attributes.resistance" : "Bludgeoning" } ) @@ -979,7 +979,7 @@ for each document in the collection, *excluding* the ``product_attributes.elements`` and ``product_attributes.resistance`` fields: -.. code-block:: shell +.. code-block:: bash use inventory db.products_catalog.createIndex( @@ -1004,7 +1004,7 @@ the document/array. The created index can support queries on any scalar field **except** those excluded by ``wildcardProjection``: -.. code-block:: shell +.. code-block:: bash db.products_catalog.find( { "product_attributes.maxSpeed" : { $gt: 25 } } ) db.products_catalog.find( { "product_attributes.superStrength" : true } ) diff --git a/source/reference/method/db.collection.createIndexes.txt b/source/reference/method/db.collection.createIndexes.txt index 627be08987e..c3313e5b525 100644 --- a/source/reference/method/db.collection.createIndexes.txt +++ b/source/reference/method/db.collection.createIndexes.txt @@ -841,7 +841,7 @@ Create a Wildcard Index on a Single Field Path The following operation creates a wildcard index on the ``product_attributes`` field: -.. code-block:: shell +.. code-block:: bash use inventory db.products_catalog.createIndexes( @@ -856,7 +856,7 @@ fields in the document/array. The wildcard index can support arbitrary single-field queries on ``product_attributes`` or one of its nested fields: -.. code-block:: shell +.. code-block:: bash db.products_catalog.find( { "product_attributes.superFlight" : true } ) db.products_catalog.find( { "product_attributes.maxSpeed" : { $gt : 20 } } ) @@ -881,7 +881,7 @@ Create a Wildcard Index on All Field Paths The following operation creates a wildcard index on all scalar fields (excluding the ``_id`` field): -.. code-block:: shell +.. code-block:: bash use inventory db.products_catalog.createIndexes( @@ -896,7 +896,7 @@ all scalar fields in the document/array. The created index can support queries on any arbitrary field within documents in the collection: -.. code-block:: shell +.. code-block:: bash db.products_catalog.find( { "product_price" : { $lt : 25 } } ) db.products_catalog.find( { "product_attributes.elements" : { $eq: "water" } } ) @@ -920,7 +920,7 @@ the ``wildcardProjection`` option to include only scalar values of the ``product_attributes.elements`` and ``product_attributes.resistance`` fields in the index. -.. code-block:: shell +.. code-block:: bash use inventory db.products_catalog.createIndexes( @@ -945,7 +945,7 @@ the document/array. The created index can support queries on any scalar field included in the ``wildcardProjection``: -.. code-block:: shell +.. code-block:: bash db.products_catalog.find( { "product_attributes.elements" : { $eq: "Water" } } ) db.products_catalog.find( { "product_attributes.resistance" : "Bludgeoning" } ) @@ -967,7 +967,7 @@ for each document in the collection, *excluding* the ``product_attributes.elements`` and ``product_attributes.resistance`` fields: -.. code-block:: shell +.. code-block:: bash use inventory db.products_catalog.createIndexes( @@ -992,7 +992,7 @@ the document/array. The created index can support queries on any scalar field **except** those excluded by ``wildcardProjection``: -.. code-block:: shell +.. code-block:: bash db.products_catalog.find( { "product_attributes.maxSpeed" : { $gt: 25 } } ) db.products_catalog.find( { "product_attributes.superStrength" : true } ) diff --git a/source/reference/method/getClientEncryption.txt b/source/reference/method/getClientEncryption.txt index 5df94fe8d24..40329796252 100644 --- a/source/reference/method/getClientEncryption.txt +++ b/source/reference/method/getClientEncryption.txt @@ -22,7 +22,7 @@ getClientEncryption() :method:`getClientEncryption()` has the following syntax: - .. code-block:: shell + .. code-block:: bash db.getMongo().getClientEncryption(); diff --git a/source/reference/method/rs.reconfig.txt b/source/reference/method/rs.reconfig.txt index 88e06687e08..bfa7bc79e96 100644 --- a/source/reference/method/rs.reconfig.txt +++ b/source/reference/method/rs.reconfig.txt @@ -21,7 +21,7 @@ Definition The :method:`rs.reconfig()` method has the following syntax: - .. code-block:: shell + .. code-block:: bash rs.reconfig( , diff --git a/source/reference/operator/aggregation/acos.txt b/source/reference/operator/aggregation/acos.txt index bb8165cd617..f327341e5c7 100644 --- a/source/reference/operator/aggregation/acos.txt +++ b/source/reference/operator/aggregation/acos.txt @@ -69,7 +69,7 @@ If the argument resolves to a value outside the bounds of - Throws an error message resembling the following formatted output: - .. code-block:: shell + .. code-block:: bash :copyable: false "errmsg" : @@ -90,7 +90,7 @@ Example The ``trigonometry`` collection contains a document that stores three sides of a right-angle triangle: - .. code-block:: shell + .. code-block:: bash { "_id" : ObjectId("5c50782193f833234ba90d85"), @@ -104,7 +104,7 @@ Example to ``side_a`` and add it to the input document using the :pipeline:`$addFields` pipeline stage. - .. code-block:: shell + .. code-block:: bash db.trigonometry.aggregate([ { @@ -126,7 +126,7 @@ Example The command returns the following output: - .. code-block:: shell + .. code-block:: bash :copyable: false { @@ -148,7 +148,7 @@ Example The ``trigonometry`` collection contains a document that stores three sides of a right-angle triangle: - .. code-block:: shell + .. code-block:: bash { "_id" : ObjectId("5c50782193f833234ba90d85"), @@ -162,7 +162,7 @@ Example to ``side_a`` and add it to the input document using the :pipeline:`$addFields` pipeline stage. - .. code-block:: shell + .. code-block:: bash db.trigonometry.aggregate([ { @@ -178,7 +178,7 @@ Example The command returns the following output: - .. code-block:: shell + .. code-block:: bash :copyable: false { diff --git a/source/reference/operator/aggregation/acosh.txt b/source/reference/operator/aggregation/acosh.txt index abfd0cf6aa2..92d1563af3e 100644 --- a/source/reference/operator/aggregation/acosh.txt +++ b/source/reference/operator/aggregation/acosh.txt @@ -74,7 +74,7 @@ bounds of ``[-1, Infinity]`` inclusive, :expression:`$acosh` throws an error. - Throws an error message resembling the following formatted output: - .. code-block:: shell + .. code-block:: bash :copyable: false "errmsg" : @@ -95,7 +95,7 @@ Example The ``trigonometry`` collection contains a document that stores a value along the ``x`` axis of a 2-D graph: - .. code-block:: shell + .. code-block:: bash { "_id" : ObjectId("5c50782193f833234ba90d85"), @@ -107,7 +107,7 @@ Example cosine of ``x-coordinate`` and add it to the input document using the :pipeline:`$addFields` pipeline stage. - .. code-block:: shell + .. code-block:: bash db.trigonometry.aggregate([ { @@ -125,7 +125,7 @@ Example The command returns the following output: - .. code-block:: shell + .. code-block:: bash :copyable: false { @@ -145,7 +145,7 @@ Example The ``trigonometry`` collection contains a document that stores a value along the ``x`` axis of a 2-D graph: - .. code-block:: shell + .. code-block:: bash { "_id" : ObjectId("5c50782193f833234ba90d85"), @@ -157,7 +157,7 @@ Example cosine of ``x-coordinate`` and add it to the input document using the :pipeline:`$addFields` pipeline stage. - .. code-block:: shell + .. code-block:: bash db.trigonometry.aggregate([ { @@ -171,7 +171,7 @@ Example The command returns the following output: - .. code-block:: shell + .. code-block:: bash :copyable: false { diff --git a/source/reference/operator/aggregation/asin.txt b/source/reference/operator/aggregation/asin.txt index e6cfa11e622..bf822b1fa3e 100644 --- a/source/reference/operator/aggregation/asin.txt +++ b/source/reference/operator/aggregation/asin.txt @@ -68,7 +68,7 @@ If the argument resolves to a value outside the bounds of - Throws an error message resembling the following formatted output: - .. code-block:: shell + .. code-block:: bash :copyable: false "errmsg" : @@ -89,7 +89,7 @@ Example The ``trigonometry`` collection contains a document that stores three sides of a right-angle triangle: - .. code-block:: shell + .. code-block:: bash { "_id" : ObjectId("5c50782193f833234ba90d85"), @@ -103,7 +103,7 @@ Example to ``side_a`` and add it to the input document using the :pipeline:`$addFields` pipeline stage. - .. code-block:: shell + .. code-block:: bash db.trigonometry.aggregate([ { @@ -125,7 +125,7 @@ Example The command returns the following output: - .. code-block:: shell + .. code-block:: bash :copyable: false { @@ -147,7 +147,7 @@ Example The ``trigonometry`` collection contains a document that stores three sides of a right-angle triangle: - .. code-block:: shell + .. code-block:: bash { "_id" : ObjectId("5c50782193f833234ba90d85"), @@ -161,7 +161,7 @@ Example to ``side_a`` and add it to the input document using the :pipeline:`$addFields` pipeline stage. - .. code-block:: shell + .. code-block:: bash db.trigonometry.aggregate([ { @@ -177,7 +177,7 @@ Example The command returns the following output: - .. code-block:: shell + .. code-block:: bash :copyable: false { diff --git a/source/reference/operator/aggregation/asinh.txt b/source/reference/operator/aggregation/asinh.txt index 40f5c48dcc2..625e738e51d 100644 --- a/source/reference/operator/aggregation/asinh.txt +++ b/source/reference/operator/aggregation/asinh.txt @@ -83,7 +83,7 @@ Example The ``trigonometry`` collection contains a document that stores a value along the ``x`` axis of a 2-D graph: - .. code-block:: shell + .. code-block:: bash { "_id" : ObjectId("5c50782193f833234ba90d85"), @@ -95,7 +95,7 @@ Example sine of ``x-coordinate`` and add it to the input document using the :pipeline:`$addFields` pipeline stage. - .. code-block:: shell + .. code-block:: bash db.trigonometry.aggregate([ { @@ -113,7 +113,7 @@ Example The command returns the following output: - .. code-block:: shell + .. code-block:: bash :copyable: false { @@ -133,7 +133,7 @@ Example The ``trigonometry`` collection contains a document that stores a value along the ``x`` axis of a 2-D graph: - .. code-block:: shell + .. code-block:: bash { "_id" : ObjectId("5c50782193f833234ba90d85"), @@ -145,7 +145,7 @@ Example sine of ``x-coordinate`` and add it to the input document using the :pipeline:`$addFields` pipeline stage. - .. code-block:: shell + .. code-block:: bash db.trigonometry.aggregate([ { @@ -159,7 +159,7 @@ Example The command returns the following output: - .. code-block:: shell + .. code-block:: bash :copyable: false { diff --git a/source/reference/operator/aggregation/atan.txt b/source/reference/operator/aggregation/atan.txt index c9f421daaa7..7a169f71099 100644 --- a/source/reference/operator/aggregation/atan.txt +++ b/source/reference/operator/aggregation/atan.txt @@ -74,7 +74,7 @@ Example The ``trigonometry`` collection contains a document that stores three sides of a right-angle triangle: - .. code-block:: shell + .. code-block:: bash { "_id" : ObjectId("5c50782193f833234ba90d85"), @@ -88,7 +88,7 @@ Example to ``side_a`` and add it to the input document using the :pipeline:`$addFields` pipeline stage. - .. code-block:: shell + .. code-block:: bash db.trigonometry.aggregate([ { @@ -110,7 +110,7 @@ Example The command returns the following output: - .. code-block:: shell + .. code-block:: bash :copyable: false { @@ -132,7 +132,7 @@ Example The ``trigonometry`` collection contains a document that stores three sides of a right-angle triangle: - .. code-block:: shell + .. code-block:: bash { "_id" : ObjectId("5c50782193f833234ba90d85"), @@ -146,7 +146,7 @@ Example to ``side_a`` and add it to the input document using the :pipeline:`$addFields` pipeline stage. - .. code-block:: shell + .. code-block:: bash db.trigonometry.aggregate([ { @@ -162,7 +162,7 @@ Example The command returns the following output: - .. code-block:: shell + .. code-block:: bash :copyable: false { diff --git a/source/reference/operator/aggregation/atan2.txt b/source/reference/operator/aggregation/atan2.txt index 2382ac14de4..a90928b7dee 100644 --- a/source/reference/operator/aggregation/atan2.txt +++ b/source/reference/operator/aggregation/atan2.txt @@ -90,7 +90,7 @@ Example The ``trigonometry`` collection contains a document that stores three sides of a right-angle triangle: - .. code-block:: shell + .. code-block:: bash { "_id" : ObjectId("5c50782193f833234ba90d85"), @@ -104,7 +104,7 @@ Example to ``side_a`` and add it to the input document using the :pipeline:`$addFields` pipeline stage. - .. code-block:: shell + .. code-block:: bash db.trigonometry.aggregate([ { @@ -124,7 +124,7 @@ Example The command returns the following output: - .. code-block:: shell + .. code-block:: bash :copyable: false { @@ -146,7 +146,7 @@ Example The ``trigonometry`` collection contains a document that stores three sides of a right-angle triangle: - .. code-block:: shell + .. code-block:: bash { "_id" : ObjectId("5c50782193f833234ba90d85"), @@ -160,7 +160,7 @@ Example to ``side_a`` and add it to the input document using the :pipeline:`$addFields` pipeline stage. - .. code-block:: shell + .. code-block:: bash db.trigonometry.aggregate([ { @@ -174,7 +174,7 @@ Example The command returns the following output: - .. code-block:: shell + .. code-block:: bash :copyable: false { diff --git a/source/reference/operator/aggregation/atanh.txt b/source/reference/operator/aggregation/atanh.txt index de99e05b7ba..a31f28cb0aa 100644 --- a/source/reference/operator/aggregation/atanh.txt +++ b/source/reference/operator/aggregation/atanh.txt @@ -80,7 +80,7 @@ If the argument resolves to negative or positive infinity, - Throws an error message resembling the following formatted output: - .. code-block:: shell + .. code-block:: bash :copyable: false "errmsg" : @@ -101,7 +101,7 @@ Example The ``trigonometry`` collection contains a document that stores a value along the ``x`` axis of a 2-D graph: - .. code-block:: shell + .. code-block:: bash { "_id" : ObjectId("5c50782193f833234ba90d85"), @@ -113,7 +113,7 @@ Example tangent of ``x-coordinate`` and add it to the input document using the :pipeline:`$addFields` pipeline stage. - .. code-block:: shell + .. code-block:: bash db.trigonometry.aggregate([ { @@ -131,7 +131,7 @@ Example The command returns the following output: - .. code-block:: shell + .. code-block:: bash :copyable: false { @@ -151,7 +151,7 @@ Example The ``trigonometry`` collection contains a document that stores a value along the ``x`` axis of a 2-D graph: - .. code-block:: shell + .. code-block:: bash { "_id" : ObjectId("5c50782193f833234ba90d85"), @@ -163,7 +163,7 @@ Example tangent of ``x-coordinate`` and add it to the input document using the :pipeline:`$addFields` pipeline stage. - .. code-block:: shell + .. code-block:: bash db.trigonometry.aggregate([ { @@ -177,7 +177,7 @@ Example The command returns the following output: - .. code-block:: shell + .. code-block:: bash :copyable: false { diff --git a/source/reference/operator/aggregation/cos.txt b/source/reference/operator/aggregation/cos.txt index 71dd7b4239e..fea873bacbd 100644 --- a/source/reference/operator/aggregation/cos.txt +++ b/source/reference/operator/aggregation/cos.txt @@ -73,7 +73,7 @@ If the argument resolves to negative or positive infinity, - Throws an error message resembling the following formatted output: - .. code-block:: shell + .. code-block:: bash :copyable: false "errmsg" : @@ -94,7 +94,7 @@ Example The ``trigonometry`` collection contains a document that stores the hypotenuse and one angle in a right-angle triangle: - .. code-block:: shell + .. code-block:: bash { "_id" : ObjectId("5c50782193f833234ba90d85"), @@ -107,7 +107,7 @@ Example to ``angle_a`` and add it to the input document using the :pipeline:`$addFields` pipeline stage. - .. code-block:: shell + .. code-block:: bash db.trigonometry.aggregate([ { @@ -127,7 +127,7 @@ Example The command returns the following output: - .. code-block:: shell + .. code-block:: bash :copyable: false { @@ -148,7 +148,7 @@ Example The ``trigonometry`` collection contains a document that stores the hypotenuse and one angle in a right-angle triangle: - .. code-block:: shell + .. code-block:: bash { "_id" : ObjectId("5c50782193f833234ba90d85"), @@ -161,7 +161,7 @@ Example to ``angle_a`` and add it to the input document using the :pipeline:`$addFields` pipeline stage. - .. code-block:: shell + .. code-block:: bash db.trigonometry.aggregate([ { @@ -178,7 +178,7 @@ Example The command returns the following output: - .. code-block:: shell + .. code-block:: bash :copyable: false { diff --git a/source/reference/operator/aggregation/degreesToRadians.txt b/source/reference/operator/aggregation/degreesToRadians.txt index 10b5480723c..d1de01affac 100644 --- a/source/reference/operator/aggregation/degreesToRadians.txt +++ b/source/reference/operator/aggregation/degreesToRadians.txt @@ -87,7 +87,7 @@ The following aggregation operation uses the its radian equivalent and add them to the input document using the :pipeline:`$addFields` pipeline stage. -.. code-block:: shell +.. code-block:: bash db.trigonometry.aggregate([ { @@ -101,7 +101,7 @@ its radian equivalent and add them to the input document using the The operation returns the following document: -.. code-block:: shell +.. code-block:: bash :copyable: false { diff --git a/source/reference/operator/aggregation/radiansToDegrees.txt b/source/reference/operator/aggregation/radiansToDegrees.txt index ad46f1454e2..eefa0c4a36a 100644 --- a/source/reference/operator/aggregation/radiansToDegrees.txt +++ b/source/reference/operator/aggregation/radiansToDegrees.txt @@ -87,7 +87,7 @@ The following aggregation operation uses the its degree equivalent and add them to the input document using the :pipeline:`$addFields` pipeline stage. -.. code-block:: shell +.. code-block:: bash db.trigangles.aggregate([ { @@ -101,7 +101,7 @@ its degree equivalent and add them to the input document using the The operation returns the following document: -.. code-block:: shell +.. code-block:: bash :copyable: false { diff --git a/source/reference/operator/aggregation/sin.txt b/source/reference/operator/aggregation/sin.txt index 52b8878a51f..2bea14aa7eb 100644 --- a/source/reference/operator/aggregation/sin.txt +++ b/source/reference/operator/aggregation/sin.txt @@ -72,7 +72,7 @@ If the argument resolves to negative or positive infinity, - Throws an error message resembling the following formatted output: - .. code-block:: shell + .. code-block:: bash :copyable: false "errmsg" : @@ -93,7 +93,7 @@ Example The ``trigonometry`` collection contains a document that stores the hypotenuse and one angle in a right-angle triangle: - .. code-block:: shell + .. code-block:: bash { "_id" : ObjectId("5c50782193f833234ba90d85"), @@ -106,7 +106,7 @@ Example to ``angle_a`` and add it to the input document using the :pipeline:`$addFields` pipeline stage. - .. code-block:: shell + .. code-block:: bash db.trigonometry.aggregate([ { @@ -126,7 +126,7 @@ Example The command returns the following output: - .. code-block:: shell + .. code-block:: bash :copyable: false { @@ -147,7 +147,7 @@ Example The ``trigonometry`` collection contains a document that stores the hypotenuse and one angle in a right-angle triangle: - .. code-block:: shell + .. code-block:: bash { "_id" : ObjectId("5c50782193f833234ba90d85"), @@ -160,7 +160,7 @@ Example to ``angle_a`` and add it to the input document using the :pipeline:`$addFields` pipeline stage. - .. code-block:: shell + .. code-block:: bash db.trigonometry.aggregate([ { @@ -177,7 +177,7 @@ Example The command returns the following output: - .. code-block:: shell + .. code-block:: bash :copyable: false { diff --git a/source/reference/operator/aggregation/tan.txt b/source/reference/operator/aggregation/tan.txt index b88a37844aa..d1af0fc1680 100644 --- a/source/reference/operator/aggregation/tan.txt +++ b/source/reference/operator/aggregation/tan.txt @@ -69,7 +69,7 @@ If the argument resolves to negative or positive infinity, - Throws an error message resembling the following formatted output: - .. code-block:: shell + .. code-block:: bash :copyable: false "errmsg" : @@ -90,7 +90,7 @@ Example The ``trigonometry`` collection contains a document that stores one side and one angle in a right-angle triangle: - .. code-block:: shell + .. code-block:: bash { "_id" : ObjectId("5c50782193f833234ba90d85"), @@ -103,7 +103,7 @@ Example to ``angle_a`` and add it to the input document using the :pipeline:`$addFields` pipeline stage. - .. code-block:: shell + .. code-block:: bash db.trigonometry.aggregate([ { @@ -123,7 +123,7 @@ Example The command returns the following output: - .. code-block:: shell + .. code-block:: bash :copyable: false { @@ -144,7 +144,7 @@ Example The ``trigonometry`` collection contains a document that stores the hypotenuse and one angle in a right-angle triangle: - .. code-block:: shell + .. code-block:: bash { "_id" : ObjectId("5c50782193f833234ba90d85"), @@ -157,7 +157,7 @@ Example to ``angle_a`` and add it to the input document using the :pipeline:`$addFields` pipeline stage. - .. code-block:: shell + .. code-block:: bash db.trigonometry.aggregate([ { @@ -174,7 +174,7 @@ Example The command returns the following output: - .. code-block:: shell + .. code-block:: bash :copyable: false { diff --git a/source/reference/program/mongod.txt b/source/reference/program/mongod.txt index 92b62324bf3..0748ed67d0c 100644 --- a/source/reference/program/mongod.txt +++ b/source/reference/program/mongod.txt @@ -291,7 +291,7 @@ Core Options :option:`--clusterIpSourceWhitelist` accepts multiple comma-separated IPv4/6 addresses or Classless Inter-Domain Routing (`CIDR `_) ranges: - .. code-block:: shell + .. code-block:: bash mongod --clusterIpSourceWhitelist 192.0.2.0/24,127.0.0.1,::1 @@ -1326,7 +1326,7 @@ LDAP Authentication or Authorization Options When constructing the query URL, ensure that the order of LDAP parameters respects RFC4516: - .. code-block:: shell + .. code-block:: bash [ dn [ ? [attributes] [ ? [scope] [ ? [filter] [ ? [Extensions] ] ] ] ] ] @@ -1347,7 +1347,7 @@ LDAP Authentication or Authorization Options This LDAP query returns any groups listed in the LDAP user object's ``memberOf`` attribute. - .. code-block:: shell + .. code-block:: bash "{USER}?memberOf?base" diff --git a/source/reference/program/mongokerberos.txt b/source/reference/program/mongokerberos.txt index 7aead822435..f6471789c30 100644 --- a/source/reference/program/mongokerberos.txt +++ b/source/reference/program/mongokerberos.txt @@ -153,7 +153,7 @@ Once you have completed these steps, you can run :binary:`~bin.mongokerberos` in server mode using the ``--server`` flag as follows: -.. code-block:: shell +.. code-block:: bash mongokerberos --server @@ -223,7 +223,7 @@ Once you have completed these steps, you can run :binary:`~bin.mongokerberos` in client mode to test user authentication, using the ``--client`` flag as follows: -.. code-block:: shell +.. code-block:: bash mongokerberos --client --username diff --git a/source/reference/program/mongoldap.txt b/source/reference/program/mongoldap.txt index 14d8bc00f25..56dd4c23ba7 100644 --- a/source/reference/program/mongoldap.txt +++ b/source/reference/program/mongoldap.txt @@ -123,14 +123,14 @@ You can use :binary:`~bin.mongoldap` to validate the configuration file, which returns a report of the procedure. You must specify a username and password for :binary:`~bin.mongoldap`. -.. code-block:: shell +.. code-block:: bash mongoldap --config= --user="bob@dba.example.com" --password="secret123" If the provided credentials are valid, and the LDAP options in the configuration files are valid, the output might be as follows: -.. code-block:: shell +.. code-block:: bash Checking that an LDAP server has been specified... [OK] LDAP server found @@ -615,7 +615,7 @@ Options When constructing the query URL, ensure that the order of LDAP parameters respects RFC4516: - .. code-block:: shell + .. code-block:: bash [ dn [ ? [attributes] [ ? [scope] [ ? [filter] [ ? [Extensions] ] ] ] ] ] @@ -636,7 +636,7 @@ Options This LDAP query returns any groups listed in the LDAP user object's ``memberOf`` attribute. - .. code-block:: shell + .. code-block:: bash "{USER}?memberOf?base" diff --git a/source/tutorial/authenticate-nativeldap-activedirectory.txt b/source/tutorial/authenticate-nativeldap-activedirectory.txt index b9b22df9439..6836f12fa7c 100644 --- a/source/tutorial/authenticate-nativeldap-activedirectory.txt +++ b/source/tutorial/authenticate-nativeldap-activedirectory.txt @@ -88,7 +88,7 @@ shows only a subset of the possible attributes. User Objects ++++++++++++ -.. code-block:: shell +.. code-block:: bash dn:CN=bob,CN=Users,DC=marketing,DC=example,DC=com userPrincipalName: bob@marketing.example.com @@ -113,7 +113,7 @@ User Objects Group Objects +++++++++++++ -.. code-block:: shell +.. code-block:: bash dn:CN=marketing,CN=Users,DC=example,DC=com member:CN=bob,CN=Users,DC=marketing,DC=example,DC=com diff --git a/source/tutorial/change-oplog-size.txt b/source/tutorial/change-oplog-size.txt index 8a218759021..59a8d89b6fb 100644 --- a/source/tutorial/change-oplog-size.txt +++ b/source/tutorial/change-oplog-size.txt @@ -39,7 +39,7 @@ A. Connect to the replica set member Connect to the replica set member using the :binary:`~bin.mongo` shell: -.. code-block:: shell +.. code-block:: bash mongo --host : diff --git a/source/tutorial/configure-a-non-voting-replica-set-member.txt b/source/tutorial/configure-a-non-voting-replica-set-member.txt index 27e7cac0672..e459ed04209 100644 --- a/source/tutorial/configure-a-non-voting-replica-set-member.txt +++ b/source/tutorial/configure-a-non-voting-replica-set-member.txt @@ -42,7 +42,7 @@ down using :dbcommand:`replSetStepDown` or its shell helper Connect a :binary:`~bin.mongo` shell to the replica set :term:`primary`: - .. code-block:: shell + .. code-block:: bash mongo --host ":" 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 c091f36d795..3db83edb24c 100644 --- a/source/tutorial/deploy-sharded-cluster-with-keyfile-access-control.txt +++ b/source/tutorial/deploy-sharded-cluster-with-keyfile-access-control.txt @@ -102,7 +102,7 @@ Create the Keyfile .. include:: /includes/extracts/keyfile-intro-sharded-cluster.rst -.. code-block:: shell +.. code-block:: bash openssl rand -base64 756 > chmod 400 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 e827536605d..7329c94db34 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 @@ -101,7 +101,7 @@ Create and Distribute the Keyfile .. include:: /includes/extracts/keyfile-intro-sharded-cluster.rst -.. code-block:: shell +.. code-block:: bash openssl rand -base64 755 > chmod 400 diff --git a/source/tutorial/kerberos-auth-activedirectory-authz.txt b/source/tutorial/kerberos-auth-activedirectory-authz.txt index d0d9f10da63..8fb67118a1c 100644 --- a/source/tutorial/kerberos-auth-activedirectory-authz.txt +++ b/source/tutorial/kerberos-auth-activedirectory-authz.txt @@ -100,7 +100,7 @@ shows only a subset of the possible attributes. User Objects ++++++++++++ -.. code-block:: shell +.. code-block:: bash dn:CN=bob,CN=Users,DC=marketing,DC=example,DC=com userPrincipalName: bob@marketing.example.com @@ -125,7 +125,7 @@ User Objects Group Objects +++++++++++++ -.. code-block:: shell +.. code-block:: bash dn:CN=marketing,CN=Users,DC=example,DC=com member:CN=bob,CN=Users,DC=marketing,DC=example,DC=com diff --git a/source/tutorial/restore-sharded-cluster.txt b/source/tutorial/restore-sharded-cluster.txt index b4741ce5d85..4b6a76d6f40 100644 --- a/source/tutorial/restore-sharded-cluster.txt +++ b/source/tutorial/restore-sharded-cluster.txt @@ -200,7 +200,7 @@ E. Restart Each :binary:`mongos ` Restart each :binary:`mongos ` in the cluster. -.. code-block:: shell +.. code-block:: bash mongos --config /path/to/config/mongos.conf