Piping and I/O Redirection

One of the main principles in Linux is that Each program does one thing well and thus, every Linux command is designed to accomplish a single task efficiently. In this chapter, you will learn how to use Linux pipes to unleash the real power of Linux commands by combining their functionality to carry out more complex tasks. You will also learn about I/O (input/output) redirection, which will enable you to read user input and save command output to a file.

Linux pipes

In Linux, you can use a pipe to send the output of one command to be the input (argument) of another command:

Figure 1 – A Linux pipe

A pipe is represented ...

Get Learn Linux Quickly now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.