Since we're now fully familiar with regular expressions, search patterns, and (extended) grep, it's time to move to one of the most powerful tools in the GNU/Linux landscape: sed. The term is short for stream editor, and it does exactly what is implied: editing streams.
In this context, a stream can be a lot of things, but in general, it is text. This text may be found within a file, but can also be streamed from another process, such as a cat grep-file.txt | sed .... In that example, the output of the cat command (equal to the content of grep-file.txt) serves as input for the sed command.
We will look at both in-place file editing and stream editing in our examples.