• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Using Pipes

While reading through this chapter, you may have thought to yourself, “Wouldn't it be nice if I could take the output of one command and feed it into another?” Good thinking! If this were possible, you could take a series of short, specialized commands and string them together into a vast collection of useful tools.

Fortunately, Unix offers this capability with pipes. Pipes use the vertical bar character (|), which is called a pipe, to separate commands in a string. The output from the first command is fed to the input of the second command and so forth. You can think of pipes as plumbing you can use to connect commands.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint