Linux administrators who want to modify files without overwriting the original have many options, but one of the most efficient tools is the stream editor — or sed.
The stream editor is a default part of most Linux distributions. It enables you to perform text file manipulations in the operating system with Linux sed commands.
Like most Linux applications, sed can process piped input, which makes it an effective scripting tool. You can use it as a basic find-and-replace tool, as in the example command below, which looks for the occurrences of one and replaces it with two. The command is closed with a /g.
Read more at TechTarget