From the course: Unix Essential Training
Unlock the full course today
Join today to access over 24,000 courses taught by industry experts.
Piping output to input - Unix Tutorial
From the course: Unix Essential Training
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.