=========================
bash-command-substitution
=========================


bash-command-substitution
=========================

Bash Command Substitution #########################

There are two ways:

-  wrap the command in “\`”:

.. code-block:: bash

myvar=\ ``cat /etc/motd``

-  wrap the command in “$()”:

.. code-block:: bash

myvar=$(cat /etc/motd)

Choose either then then try this:

.. code-block:: bash

echo $myvar
