From the course: Linux: Shells and Processes
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Connecting programs with pipes - Linux Tutorial
From the course: Linux: Shells and Processes
Connecting programs with pipes
- A pipe is a method of one program, communicating with another. A common use of a pipe is taking the standard output of one command and sending it to the standard input of another command. For instance, we could search through a file with grep and if the output was too long to fit on the screen, we could pipe the output to less a pager. Type into a terminal grep space, tcp, space, slash, etc, slash, services, space, pipe, space, less, and hit enter. This uses the grep command to search through the etsy services file for the word TCP and sends the resulting output to the less command, which displays it one page at a time. To quit press Q. You can pipe any number of times as it's not limited to just two commands. Bring your line back and erase less. Now add, awk, space, single quote, left curly brace, print, space, dollar sign, one, right curly brace, single quote, space, pipe, space, sort, space,…
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.
Contents
-
-
-
-
(Locked)
Escape characters and quotes5m 44s
-
(Locked)
Brace expansion6m 12s
-
(Locked)
Command and variable substitution7m 14s
-
(Locked)
Command input and output1m 55s
-
(Locked)
Connecting programs with pipes4m 19s
-
(Locked)
File redirects and tees6m 8s
-
(Locked)
Combining pipes, redirects, and tees6m 41s
-
(Locked)
Command lists and subshells7m 53s
-
(Locked)
-
-
-