The concept of using a command's output for another command's input is called piping. A pipe eliminates the need for temporary files: instead, the output of one command goes directly to the input of the next.
A pipe is not only faster than creating temporary files, it is faster than using redirection: when using redirection, the system has to wait until all data has been redirected to begin the next command, whereas with piping, the next command is started as soon as data is available to it.
As a pipe example, let's find out how many users are logged onto the system:
who | wc -lwhere who is the command to display all users on the system (one line per user), and wc -l is the command to count how many lines the input file contains (i.e. the number of users).
Without the pipe command, the following would have to be used:
who > /tmp/tempfile
wc -l < /tmp/tempfile
Note that the sign for pipe is a vertical bar |.