For example, when running
echo a; echo b
in the terminal, its output is:
a
b
It seems to me that the semi
it's a way to simulate a newline.
echo a; echo b
is equivalent to
echo a
echo b
The ; separates the two commands.
echo a; echo b
It lets the bash know that echo a and echo b are two separate commands and need to be run separately one after the other
Try without semicolons
$ echo a echo b
a echo b
Here the statement is taken as a single command echo and a echo b is passed as parameter to the echo
It's a statement separator. You could also try
sleep 1; echo a
which will wait one second and then display a. As would
sleep 1 && echo a