# Shell's command operators / separators. A non-exhaustively list of command operators / separators tested on bash and zsh both on MacOs Catalina and Ubuntu 20.04. Taken from (Maxim Egorushkin's answer)[https://stackoverflow.com/a/5130889/3594287] on https://stackoverflow.com/a/5130889/3594287 ## Commands ### | ```shell | ``` pipes (pipelines) the standard output (stdout) of one command into the standard input of another one. Note that stderr still goes into its default destination, whatever that happen to be. ### |& ```shell |& ``` pipes both stdout and stderr of one command into the standard input of another one. Very useful, available in bash version 4 and above. ### && ```shell && ``` executes the right-hand command of && only if the previous one succeeded. ### || ```shell || ``` executes the right-hand command of || only it the previous one failed. ### ; ```shell ; ``` executes the right-hand command of ; always regardless whether the previous command succeeded or failed. Unless set -e was previously invoked, which causes bash to fail on an error.