Re: Updating /etc/hosts automatically / behavior of sed command

2013-07-18 Thread Goswin von Brederlow
On Fri, Jul 05, 2013 at 10:14:54AM +0200, Thomas Hood wrote: Tad Frank wrote: Your issue lies in the line: sed -e s/$REGISTERED_IP/$CURRENT_IP/g /etc/hosts /etc/hosts.new I searched debian-devel for the message to which you are responding; the most recent message with that subject

Re: Updating /etc/hosts automatically / behavior of sed command

2013-07-05 Thread Tad Frank
Your issue lies in the line: sed -e s/$REGISTERED_IP/$CURRENT_IP/g /etc/hosts /etc/hosts.new Take a look at the modification I made below, it should help. if [ $CURRENT_IP != $REGISTERED_IP ] ; then echo -n IP address has changed: creating a new /etc/hosts file sed -i.old

Re: Updating /etc/hosts automatically / behavior of sed command

2013-07-05 Thread Thomas Hood
Tad Frank wrote: Your issue lies in the line: sed -e s/$REGISTERED_IP/$CURRENT_IP/g /etc/hosts /etc/hosts.new I searched debian-devel for the message to which you are responding; the most recent message with that subject header dates from December 1999. Yes, people were dynamically updating