I have input files that contain lines with variables like
HOSTNAME=$THISHOST
DOMAIN=$THISDOM
and another one that has the definitions like
THISHOST=linux007
THISDOM=rvdheij.com
and I want to produce the files that are like
HOSTNAME=linux007
DOMAINT=rvdheij.com
So I thought I could simply source the definitions
and then run a little loop like
. ./mydefs
while read line ; do
eval echo "$line" ;
done
This works, except for comment lines in my original
input that suddenly turn out to be blank lines? Now I
suppose I can treat those differently, but what else
am I going to find as a surprise?
Rob