View Single Post
Old 10-06-2005, 08:15 PM   #2 (permalink)
taylor
Junior Member
 
Join Date: Aug 2005
Posts: 28
Default

On the fly here ~ so use caution - example current ip is 72.96.52.127 and your named.conf file resides in the etc directory.

Code:
#!/bin/sh # you must be root to run this script # Lets store some user input to variables echo "" cd /etc echo "Enter your new ip address" read var1 echo "I've logged your ip addy $var1" for fl in named.conf; do mv $fl $fl.old sed "s/72.96.52.127/$var1/g" $fl.old > $fl rm -f $fl.old done echo " ***************************************************************" echo " .... Your file updates are complete" echo " ***************************************************************" exit
taylor is offline   Reply With Quote
Sponsored Links