[ale] read config file from shell script

Nick Lucent nlucent at mindspring.com
Tue Nov 30 17:38:32 EST 1999


Im writing a set of scripts to automatically a: determine my IP (dhcp), then
update /etc/hosts accordingly (change IP and domain), and b: perform other
scripted functions depending on that IP (change netscapes proxy etc). My
question is, how do I read a config file in the format of
HOME=192.168.1
WORK=15.23.126
etc. Would I use sed or awk? Right now its hardcoded into the script, but
that isnt a very good approach. Also how do I replace an entire line in
/etc/hosts? Would I use sed or awk for that as well?

Thanks
Nick

ps. If any of this isnt very clear please let me know and Ill allaborate
more =)

-- 
Windows NT: Security through unavailability.






More information about the Ale mailing list