From the course: Linux Tips

Unlock this course with a free trial

Join today to access over 22,400 courses taught by industry experts.

Working with text: sed

Working with text: sed - Linux Tutorial

From the course: Linux Tips

Working with text: sed

- [Instructor] Sed or a stream editor is a tool that allows us to manipulate text on a Linux system. While we might think of a text editor nowadays as an application where we can move around text on the screen, inserting and deleting as we go, sed is a little bit different. It can be used on its own, and it's also very commonly used as a component of a series of piped commands. That's why it's called a stream editor rather than being an interactive editor. It's more of a way to create a little one shot transformation unit for a text coming into it. And that makes it really helpful for one liners that process data and utilities that transform text in helpful ways. Sed can delete blank lines in a file for example, or insert text at a given position. It can transpose and substitute characters, replace text and more. While we can pipe text into sed for processing, it can be easier to experiment using a text file. So I'll use a text file that I have here. You can create a file yourself or…

Contents