The purpose is to keep it simple and smooth.
A code block can be a shell scrip/ commands too.
For example, let's make a code-block to instruct, how to create a directory and go inside it? (let's say your new directory name is demo
)
mkdir demo
cd demo
Consider the following statement:
"To remove the directory demo
, just type $ rm -rf demo
in your terminal."
Now, you can see that there 2 mono-spaced entities:
demo
- It is a mono-spaced word.$ rm -rf demo
- It is a terminal command sincerm -rf demo
is written after$
character, accompanied by one white-space.
Anything wirtten after #
is a comment. Even, terminal commands written after it are also comments. This may be used to display outputs in code blocks or to explain the usage of a commnd.