If you’re working with text files on a Linux system, you may need to modify the contents of those files. One useful tool for this task is sed, which stands for stream editor, which allows you to perform various text manipulations, such as replacing text, deleting lines, and adding new lines.
In this article, we’ll show you how to use sed to add a new line after a specific string in a file.