named.conf string replacement via command line

I need to search through my named.conf file and replace all of the instances of ns1.mydomain.com with the IP for that nameserver. Now, I already did this once manually, but it got overwritten by cpanel when it updated (DOH!). Anyways, I am sure there is a way to do this in one clean sweep via the command line, so if someone could give me a quick and easy solution for this I would appreciate it!

 

 

 

 

Top