Piping and Redirection

There are STDIN(0), STDOUT(1) & STDERR(2):

Stream Name Description
Standard Input (STDIN) Data fed into the program
Standard Output (STDOUT) Output from the program (defaults to terminal)
Standard Error (STDERR) Error messages (defaults to terminal)

We can use |< or > to pass any of the 3 streams to other programs:

Redirecting to a New File

Redirecting to an Existing File

Redirecting from a File

Redirecting STDERR

Piping


Relevant Note(s): Linux Basics