Replace your text from a file

In Unix, basically you could easily replace all of the specific text to another text without using the editor.

By using replace command, you could replace your text within seconds.

The structure of the replace command will be as below.

replace old_text new_text — file

Example,

replace 127.0.0.1 255.255.255.255 — /var/named/mickgenie.com.db

with the command above, the IP of 127.0.0.1 will change to 255.255.255.255 for file /var/named/mickgenie.com.db.