4. Pipes and Filters

note

teaching: 15 minutes

exercises: 10 minutes

questions:

  • How can I combine existing commands to do new things?

objectives:

  • Redirect a command’s output to a file.
  • Process a file instead of keyboard input using redirection.
  • Construct command pipelines with two or more stages.
  • Explain what usually happens if a program or pipeline isn’t given any input to process.
  • Explain Unix’s ‘small pieces, loosely joined’ philosophy.