I have a file like
name1=value1 name2=value2
I need to read this file using shell script and set variables
$name1=value1 $n
suppose the name of your file is some.properties
some.properties
#!/bin/sh # Sample shell script to read and act on properties # source the properties: . some.properties # Then reference then: echo "name1 is $name1 and name2 is $name2"