CLI Components

Common Operators

&& (logical AND) - where the command after this operator will only execute if the first command has executed successfully • || (logical OR) - where the command after this operator will only execute if the first has failed • ; (semi-colon) - where the command after this operator will execute regardless of whether the first has executed successfully or not • | (pipe) - where the command before this operator is the input for the subsequent command after the operator • & (ampersand) - sends the current command to the background • >, <, >>> (redirection) - directs the output of a command or group of commands commonly for files or streams

Stream redirection

• stdin – Standard input (the data going into the program) • stdout – Standard output (the data coming out of the program) • stderr – Standard error (any error messages generated when running the program)

Last updated