Text Manipulation

Overview

Text manipulation is the foundation of Unix system administration. These tools let you transform, filter, and process text streams - from log files to configuration management.

In This Section

Topic Description

Pipeline Dojo

Master the art of chaining commands with pipes. Build complex data transformations from simple tools.

Text Processing

Comprehensive coverage of awk, cut, tr, sort, uniq, paste, join, and column formatting.

sed Deep Dive

Stream editor mastery - pattern space, hold space, branching, and production scenarios.

When to Use What

Tool Best For Example

cut

Extracting fixed columns/fields

cut -d: -f1 /etc/passwd

awk

Field processing with logic

awk '$3 > 1000 {print $1}' /etc/passwd

sed

Line-oriented transformations

sed 's/old/new/g' file

tr

Character translation/deletion

tr '[:lower:]' '[:upper:]'

sort

Ordering lines

sort -t: -k3 -n /etc/passwd

uniq

Deduplication (sorted input)

sort file | uniq -c

Learning Path

  1. Start with Pipeline Dojo to understand how tools connect

  2. Learn individual tools in Text Processing

  3. Deep dive into sed for advanced transformations