Need bash shell script for reading name value pairs from a file

If all lines in the input file are of this format, then simply sourcing it will set the variables:

source nameOfFileWithKeyValuePairs

or

. nameOfFileWithKeyValuePairs

Leave a Comment