barmar at bbnplanet.com
Sat Nov 6 07:10:38 UTC 1999
In article <8008em$mo$1 at nntp6.atl.mindspring.net>,
Alex <test.AT.webderland.DOT.com at nntp6.atl.mindspring.net> wrote:
>Can someone tell me how I can replace 1 line of text in 290 db files? Is
>there some sort of grep command or vi command that will recursively go thru
>each db.domain.com file in my /var/named dir and replace a current name
>server with a new name server?
This seems more like a Unix question than a BIND question. How you do this
is independent of what the files are used for. Any way, the simplest way
perl -i.bak -e 's/old/new/' db.*
If you don't have perl, use:
for file in db.*; do
sed 's/old/new/' $file > $file.new
mv $file $file.bak
mv $file.new $file
>Please email me if you know!
I hope I figured out the right way to unmunge your address.
Barry Margolin, barmar at bbnplanet.com
GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
More information about the bind-users