You might need to execute several commands on the Command Line Interface, or CLI for short.
Sometimes, you need to execute them in order, sometimes in parallel. This is done using different symbols and this post is a reference on how to do it.
Executed In Order
echo $HOME && pwd
echo is successful.
echo $HOME || pwd
echo $HOME; pwd
pwd after completing
echo, regardless of its exit status.
Reference link: http://linux.die.net/Linux-CLI/x2622.htm
Executed In Parallel
echo $HOME & pwd
be careful with the placement of
& operator. If it's used as the last character, then the entire command now runs in the background.
The above command runs both tasks with notification from the command line.
 21736 / /Users/angelawang + Done echo $HOME
- Note that commands are not executed in the order they were specified.
You can group command executions using parentheses like so
echo $HOME & (cd / && pwd)
and the output would look like this
 21750 /Users/angelawang / + Done echo $HOME