Run Linux shell commands sequentially

http://yalneb.blogspot.com/2017/02/run-linux-shell-commands-sequentially.html

It is possible to concatenate Linux shell commands using either && or || or ;.
  • && Run second command if the exit status of the first command is successful.
  • || Run second command if the exit status of the first command is not successful.
  • ; Run second command no matter what the exit status of the previous command.
As shown in the figure above, this can become very handy to concatenate Linux commands depending on their exit status, specially if the first command is rather slow and you do not want to wait for it to finish. For example, I use && all the time to compile some source code from the terminal and run it as soon as it finishes.

Note that you can run an arbitrary long number of commands sequentially, so go out and play while you leave your workstation finish a batch of commands.