MISSION 69

Piping and Redirecting Output

In an earlier mission, we looked at how to redirect output from a command to a file using >. This is called output redirection, and you’ll be learning how to do that in more detail over the course of this mission. 

In this mission, you will discover how to redirect output from one command to an empty file, and redirect the output from the screen to files. You'll also learn about wildcard characters and escaping characters to have greater control of output when you use commands such as grep and echo.

In this mission, we will also cover the concept of piping, how it is used, and why it is important. The basic idea of piping is cutting off the intermediate step of writing to a file and connecting the output of a command directly to the input of another command. Building effective data pipelines can greatly improve workflow efficiency on big data analysis and data science projects, so this is a key skill for data scientists to learn.

As you work through each concept, you will be given an opportunity to practice what you have learned so far. The terminal inside of this mission includes answer checking so you can ensure that you've fully mastered each concept before learning the next concept.

Objectives

  • Learn to build a basic shell pipeline.
  • Learn to search files using grep.

Mission Outline

1. Appending
2. Redirecting from a file
3. The grep command
4. Special characters
5. The star wildcard
6. Piping output
7. Chaining commands
8. Escaping characters
9. Takeaways

command-line-intermediate

Course Info:

Intermediate

The median completion time for this course is 6 hours. View Details

This course requires a basic subscription and includes four missions and one guided project. It is the ninth course in the Data Analyst in Python path and Data Scientist in Python path.

START LEARNING FREE

Take a Look Inside