I have a file having parametrs as below
unix> cat file.txt
name=annamathew
description=keep smiling always good for health
address=chennaiMy requirement is :I have one shell script ,In that script ,I need to get the value of parameters name ,description .
Since your file is the structure of, command=var, all that needs to be done is perform an eval on a string containing an export command. What complicates this is the fact that the description does not contain beginning and ending double quotes as such: description="keep smiling always good for health"
#!/bin/ksh while read myline do eval "export \"$myline\"" done < file.txt echo "$name" echo "$description"