I have a file like
name1=value1 name2=value2
I need to read this file using shell script and set variables
$name1=value1 $n
if your file location is /location/to/file and the key is mykey:
/location/to/file
mykey
grep mykey $"/location/to/file" | awk -F= '{print $2}'