Output Redirection and Piping
Output Redirection
Most processes initiated by UNIX commands take their input from the standard input (i.e. the keyboard) and write their output to the standard output (i.e. the terminal screen).
The "<" sign can be used to redirect the input, that is to specify that the input comes from something other than the keyboard.
The ">" sign can be used to redirect the output, that is to specify that the output goes to something other than the terminal screen.
The ">>" sign can be used to append the output to something other than the terminal screen.
Piping
A pipe is denoted by "|".
Several pipes can be used in the same command line to create a "pipeline".
A pipe takes the output of a command and immediately sends it as input to another command.
A pipe is often used in conjunction with the command "less" to view the output within the pager.
Last updated