From the course: Unix Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Piping output to input

Piping output to input - Unix Tutorial

From the course: Unix Essential Training

Start my 1-month free trial

Piping output to input

- [Instructor] We've seen how to send data from one command to a file and from a file to a command. And this movie will learn to send data from one Unix command to another Unix command. And we'll do that using a technique called piping. The way that we pipe output to input is by using what we call the pipe operator. And it looks like a pipe, is that vertical bar. You probably will find it on the far right side of your keyboard, above return. Unlike the previous examples, there's no file involved here. We have one command that's on the left, and its output is going to become the input to the second command on the right. To demonstrate this, let's start by just taking a look at what's inside the people.txt file. I'm using the Cat command in order to do that. In this case the output from the command went to the terminal window. If we instead use that pipe operator, we can send that data somewhere else. Let's send it to these…

Contents