title: shellscript reading variables from a file
body: <p>I am new to shell scripting. I am working on a project where the requirement is like one script file will set the variables and another script file has to get those variables and manipulate it. I am storing the variables from first script into a file and in second script file I am reading it.</p>
  
  <p>In first script file, first.sh , I am doing like</p>
  
  <pre><code>echo "a=6" &gt; test.dat
  echo "b=7" &gt;&gt; test.dat
  echo "c=8" &gt;&gt; test.dat
  </code></pre>
  
  <p>I use <code>&gt;</code> for the first variable where it overwrites and for the next values it appends. So the file will have the latest values always. </p>
  
  <p>Is there any better approach than this ?</p>
  
  <p>In the second script file how can read and fill the appropriate values ?</p>