From the course: Learning Linux Command Line

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Use pipes to connect commands together

Use pipes to connect commands together - Linux Tutorial

From the course: Learning Linux Command Line

Use pipes to connect commands together

- [Narrator] At the command line, we use pipes to take the output of one command and send it to another. We can think of commands as little processing units that do one particular thing and pipes as connections between those units. So for example, we can use pipes to take the output of the cat command, and then instead of displaying the text on the screen, pass the result to the sort command. And then if we wanted to, we could pass that output somewhere else and keep working on the contents of the users.TXT file step-by-step until we transform it in the way we want. This diagram is represented by this command or a set of commands. A set of commands, connected by pipes is often called a command to pipeline. The pipe character, which is represented as a vertical bar, or sometimes as a vertical bar with a little break in the middle is usually the shift character on the backslash key, which is found above enter or return…

Contents