bash-command-substitution

bash-command-substitution

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

There are two ways:

.. code-block:: bash

myvar=cat /etc/motd

.. code-block:: bash

myvar=$(cat /etc/motd)

Choose either then then try this:

.. code-block:: bash

echo $myvar