Zsh Tutorial: sed Substitution, Patterns & Practical Commands #18
1views
009:36
T
Taught by Celeste AI - AI Coding Coach
View on YouTubeDescription
Learn sed in Zsh! This lesson covers basic substitution with s/old/new/, global and case-insensitive flags, in-place editing, alternate delimiters, line and
pattern addressing, ranges, negation, deleting lines, inserting and appending text, multiple commands, and piping with sed.
🔗 Source code: https://github.com/GoCelesteAI/zsh_text_processing_sed
⏱️ Timestamps:
0:00 — Intro
0:26 — Basic sed Explained
1:06 — Basic sed Demo
3:02 — Patterns & Ranges Explained
3:42 — Patterns & Ranges Demo
5:39 — Practical sed Explained
6:17 — Practical sed Demo
8:23 — Recap
9:05 — End
📋 Topics covered:
• Basic substitution: sed 's/old/new/' file
• Global replace with g flag
• Case-insensitive matching with I flag
• In-place file editing with -i
• Alternate delimiters (|, #, etc.)
• Line number addressing: sed -n '3p'
• Line ranges: sed -n '2,4p'
• Pattern addressing: sed -n '/regex/p'
• Pattern ranges: sed -n '/start/,/end/p'
• Negation with !: sed -n '/^#/!p'
• Deleting lines with d command
• Insert before with i command
• Append after with a command
• Multiple commands with -e flags
• Piping output to sed
• Stripping comments and blank lines
🎬 Part of the Zsh Shell Tutorial series — subscribe for weekly lessons!
Tags
zshzsh tutorialsedsed tutorialtext processingstream editorfind and replaceshell scriptingsed substitutionsed patternssed rangessed deletesed insertsed appendsed pipes
Back to tutorialsOpen in YouTube
Duration
9:36
Published
February 16, 2026
Added to Codegiz
March 15, 2026