Module 06 of 11

Text Processing & Pipes

Lessons

About This Module

Linux commands are small on purpose. Each one does a single job, and the real power comes from combining them. This module shows you how to connect commands together and how to search, filter, and reshape text, which is the everyday work of reading logs, configuration files, and command output.

It starts with redirection: the standard input, output, and error streams and the >, >>, <, and 2> operators. Next come pipes, which feed the output of one command into another. From there you'll learn to search with grep, then to sort, count, and cut text with sort, uniq, cut, and wc. It closes with an introduction to sed and awk for replacing text and working with columns.

Build pipelines one step at a time and check the output after each command. When you're comfortable chaining commands, continue on to Users, Groups & Processes.

Lessons

5 videos
01

Input & Output Redirection

Learn the three standard streams (stdin, stdout, and stderr) and use >, >>, <, and 2> to send output to files and read input from them.

02

Chaining Commands with Pipes

Use the | operator to pass the output of one command to the input of the next, and see how small commands combine into powerful one-liners.

03

Searching Text with grep

Find lines that match a pattern in a file or in piped output, and use common options such as case-insensitive, inverted, and recursive searches.

04

Sorting & Counting: sort, uniq, cut & wc

Sort lines, remove or count duplicates, pull out columns, and count lines and words, then combine them to summarize a file.

05

Editing Streams: sed & awk

Replace text with sed, work with columns using awk, and combine them with grep to pull useful information out of log files.