Video Coming Soon...

Created by Zed A. Shaw Updated 2024-12-10 18:57:40

09: Advanced sed Tricks

I'll now take you through some advanced things you can do with sed that are honestly difficult to do with many other tools. You can do all of this with any programming language, and awk would possibly be even better. The advantage of sed is it's quick to use for small quick tasks.

Scripting sed

Commenting Your Scripts

Edit a Ton of Files

Editing Specific Lines

Skipping Lines

Grouping Commands

Writing Results to Files

Multi-line Mode

Transpose Characters

Insert, Append, and Replace Lines

Read a File Into the Output

Learning More

https://www.gnu.org/software/sed/manual/sed.html

https://www.pement.org/sed/sed1line.txt

Previous Lesson Next Lesson

Register for Learn Regex the Hard Way

Register to gain access to additional videos which demonstrate each exercise. Videos are priced to cover the cost of hosting.