Skip to content

DOCSP-15360, DOCSP-15404 foreport code block bash part1 #5175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/core/index-wildcard.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 } } )
Expand Down
4 changes: 2 additions & 2 deletions source/core/security-ldap-external.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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 [email protected] --password --authenticationDatabase '$external' --authenticationMechanism "PLAIN" --host "mongodb.example.com" --port 27017

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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')")
Expand Down
4 changes: 2 additions & 2 deletions source/includes/extracts-wildcard-indexes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" })
Expand Down
2 changes: 1 addition & 1 deletion source/includes/steps-4.2-downgrade-replica-set.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ content: |
:option:`--dbpath <mongod --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/*

Expand Down
2 changes: 1 addition & 1 deletion source/includes/steps-4.2-downgrade-sharded-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ content: |
:option:`--dbpath <mongod --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/*

Expand Down
2 changes: 1 addition & 1 deletion source/includes/steps-4.4-downgrade-replica-set.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ content: |
:option:`--dbpath <mongod --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/*

Expand Down
2 changes: 1 addition & 1 deletion source/includes/steps-4.4-downgrade-sharded-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ content: |
:option:`--dbpath <mongod --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/*

Expand Down
2 changes: 1 addition & 1 deletion source/includes/steps-configure-ldap-mongodb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ content: |
options, substituting ``<host>`` and ``<user>``, and
enter your password when prompted:

.. code-block:: shell
.. code-block:: bash

mongo --host <host> --authenticationMechanism PLAIN --authenticationDatabase '$external' -u <user> -p

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <path-to-config-file>

Expand Down Expand Up @@ -299,7 +299,7 @@ pre: |
<activedirectory-authauthz-userObj>`, you can authenticate as the user
``[email protected]`` and receive the required permissions.

.. code-block:: shell
.. code-block:: bash

mongo --username [email protected] --password --authenticationMechanism 'PLAIN' --authenticationDatabase '$external' --host <hostname> --port <port>

Expand Down
2 changes: 1 addition & 1 deletion source/includes/steps-csfle-shell-aws-create-key.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ content: |
:option:`--eval <mongo --eval>`, :option:`--shell <mongo --shell>`,
and :option:`--nodb <mongo --nodb>` options:

.. code-block:: shell
.. code-block:: bash

mongo --eval "
var AWS_ACCESS_KEY_ID = '$AWS_ACCESS_KEY_ID'
Expand Down
2 changes: 1 addition & 1 deletion source/includes/steps-csfle-shell-azure-create-key.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ content: |
:option:`--eval <mongo --eval>`, :option:`--shell <mongo --shell>`,
and :option:`--nodb <mongo --nodb>` options:

.. code-block:: shell
.. code-block:: bash

mongo --eval "
var AZURE_TENANT_ID = '$AZURE_TENANT_ID'
Expand Down
2 changes: 1 addition & 1 deletion source/includes/steps-csfle-shell-gcp-create-key.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ content: |
:option:`--eval <mongo --eval>`, :option:`--shell <mongo --shell>`,
and :option:`--nodb <mongo --nodb>` options:

.. code-block:: shell
.. code-block:: bash

mongo --eval "
var GCP_EMAIL = '$GCP_EMAIL'
Expand Down
4 changes: 2 additions & 2 deletions source/includes/steps-csfle-shell-local-create-key.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -41,7 +41,7 @@ content: |
<mongo --eval>`, :option:`--shell <mongo --shell>`, and
:option:`--nodb <mongo --nodb>` options:

.. code-block:: shell
.. code-block:: bash

mongo --eval "var LOCAL_KEY = '$DEV_LOCAL_KEY' " \
--shell --nodb
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pre: |
:option:`--config <mongos --config>`. For example, if the updated configuration file
were named ``mongos-secure.conf``:

.. code-block:: shell
.. code-block:: bash

mongos --config <path>/mongos-secure.conf

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pre: |
using :option:`--config <mongod --config>`. For example, if the new
configuration file were named ``mongod-secure.conf``:

.. code-block:: shell
.. code-block:: bash

mongod --config <path>/mongod-secure.conf

Expand Down Expand Up @@ -93,7 +93,7 @@ pre: |
:option:`--config <mongod --config>`. For example, if the new configuration file
were named ``mongod-secure.conf``:

.. code-block:: shell
.. code-block:: bash

mongod --config <path>/mongod-secure.conf

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pre: |
:option:`--config <mongos --config>`. For example, if the {{status}} configuration file
were named ``mongos-secure.conf``:

.. code-block:: shell
.. code-block:: bash

mongos --config <path>/mongos-secure.conf

Expand Down
6 changes: 3 additions & 3 deletions source/includes/steps-install-mongodb-on-amazon-tarball.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -40,15 +40,15 @@ content: |

- Copy the binaries into ``/usr/bin/``.

.. code-block:: shell
.. code-block:: bash

sudo cp <mongodb-install-directory>/bin/* /usr/bin/

**-OR-**

- Create symbolic links to each of these binaries to ``/usr/bin/``:

.. code-block:: shell
.. code-block:: bash

sudo ln -s /full/path/to/<mongodb-install-directory>/bin/* /usr/bin/

Expand Down
10 changes: 5 additions & 5 deletions source/includes/steps-kerberos-auth-activedirectory-authz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pre: |
Connect to the MongoDB server using the :binary:`~bin.mongo` shell using the
:option:`--host <mongo --host>` and :option:`--port <mongo --port>` options.

.. code-block:: shell
.. code-block:: bash

mongo --host <hostname> --port <port>

Expand All @@ -106,7 +106,7 @@ pre: |
:option:`--authenticationMechanism <mongo --authenticationMechanism>` for the
MongoDB server's configured authentication mechanism.

.. code-block:: shell
.. code-block:: bash

mongo --host <hostname> --port <port> --username <user> --password <pass> --authenticationDatabase="admin" --authenticationMechanism="<mechanism>"

Expand Down Expand Up @@ -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 <path-to-keytab> mongod --config <path-to-config-file>

Expand All @@ -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 <path-to-config-file>

Expand Down Expand Up @@ -495,7 +495,7 @@ pre: |
<kerb-auth-ldap-authz-userObj>`, you can authenticate as the user
``[email protected]`` and receive the required permissions.

.. code-block:: shell
.. code-block:: bash

mongo --username [email protected] --password --authenticationMechanisms="GSSAPI" --authenticationDatabase "$external" --host <hostname> --port <port>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion source/includes/steps-run-mongodb-on-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
16 changes: 8 additions & 8 deletions source/reference/command/createIndexes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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 } } )
Expand All @@ -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(
Expand All @@ -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" } } )
Expand All @@ -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(
Expand Down Expand Up @@ -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" } )
Expand All @@ -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(
Expand Down Expand Up @@ -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 } )
Expand Down
4 changes: 2 additions & 2 deletions source/reference/configuration-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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] ] ] ] ] ]

Expand All @@ -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"

Expand Down
Loading