Bash read config file and store value from config file

Back

Reading config file

This should be enough to read variables which are stored in a file

source file.config

Update value in a config file

sed -c -i "s/\($TARGET_KEY *= *\).*/\1$REPLACEMENT_VALUE/" $CONFIG_FILE