Since your config file is a valid shell script, you can source it into your current shell:
. config_file
echo "Content of VARIABLE1 is $VARIABLE1"
echo "Content of VARIABLE2 is $VARIABLE2"
echo "Content of VARIABLE3 is $VARIABLE3"
Slightly DRYer, but trickier
. config_file
for var in VARIABLE1 VARIABLE2 VARIABLE3; do
echo "Content of $var is ${!var}"
done
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…