0Pricing
Linux Command Line Mastery · Lesson

Stream Editing at Scale with sed and tr

Apply regex-powered transformations across streams using sed substitution and translate or delete characters with tr.

From Matching to Transforming

You have mastered regex matching with grep and find. The natural next step is transforming the text you match. sed and tr turn your regex skills into edits.

sed Substitution Basics

The s/pattern/replacement/ command replaces the first match per line. Add g for all matches.

echo 'cat cat cat' | sed 's/cat/dog/g'

All lessons in this course

  1. Mastering Regular Expressions (Regex)
  2. Advanced `grep` and `find` Patterns
  3. `xargs` for Command Chaining
  4. Stream Editing at Scale with sed and tr
← Back to Linux Command Line Mastery