[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] read config file from shell script
- Subject: [ale] read config file from shell script
- From: nlucent at mindspring.com (Nick Lucent)
- Date: Tue, 30 Nov 1999 17:38:32 -0500
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.