Several methods of executing multiple commands in Linux shell

can execute more than one command at a time on the command line, in the following categories:

1. Use between each command;

indicates that the execution results of each command will not affect the execution of other commands. In other words, each command will execute,
but there is no guarantee that each command will execute successfully.

cd /home/PyTest/src; python

2. Use &amp between each command; & Separate
indicates that the following command will only be executed if the previous command succeeds. This ensures that all commands are executed successfully.

cd /home/PyTest/src&&python

3. Use | or | or | between each command

pipe can direct the output of one command to the input of another, allowing two (or more) commands to work in a continuous pipeline, constantly processing text streams. On the command line, we use | for pipes

cd /home/PyTest/123 || echo "error234"
cd /home/PyTest/123 | echo "error234"

Read More: