Beruflich Dokumente
Kultur Dokumente
Linux Bash
Introduction
The default behavior of the bash shell and the Linux operating system is to execute typed
commands sequentially in serial order. So, when we type multiple commands on the
terminal prompt and chain them using semicolons then the shell would first execute one
command, wait for it to finish execution and then execute the next command and so on.
This sequential or serial behavior is fine for most scenarios but sometimes we may have the
need to execute commands in a parallel fashion. The general requirement for parallel
command execution arises from the necessity to save time i.e. do more in less time.
Currently, there are many automation tools and utilities available that allow users to
perform tasks parallel on the same system or across different systems.
But what if we want to accomplish parallel task execution without installing any additional
tools?
Once we press the enter key after typing the commands, we first see the process IDs of the
processes being generated by the execution of the commands. Next we see the output of the
commands and finally, we get notified that the commands have completed execution.
We included the date command in the above example to further illustrate that both
commands get executed over separate SSH connections at the same time in parallel.
Conclusion