From the course: LPI Linux Essentials (010-160) Cert Prep

Unlock the full course today

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

Command-line pipes

Command-line pipes - Linux Tutorial

From the course: LPI Linux Essentials (010-160) Cert Prep

Start my 1-month free trial

Command-line pipes

- Sometimes, when we're running a command, we want to take the output of one command and push it over into the input of the next command. To do that, we use what's known as a command line pipe. Now, a command line pipe, or a pipeline, is a standard output from one programmer command that's being redirected as a standard input into a second programmer command. A pipe is created by using a vertical bar between two different commands, and this key can be found above the Enter key on your keyboard and accessed by pressing the Shift key and pressing the key. These pipelines can be useful when applied in various different ways. For example, you may have a lengthy output from a command like cat, that would display a lot of information to the screen. Well, if you want to pipe it with the less command, this will show you only one scroll length, or one screen at a time, until you hit the next page option. This avoids jumping all the…

Contents