title: How to export a library path from a child shell script and use the path in the parent shell?
body: <p>I have the following files</p>
  
  <ol>
  <li><p>build.sh</p>
  
  <pre><code>source exportpath.sh
  </code></pre></li>
  <li><p>exportpath.sh</p>
  
  <pre><code>export LD_LIBRARY_PATH=/usr/local/lib/
  </code></pre></li>
  </ol>
  
  <p>But,when I am executing this build.sh and then running the <code>echo $LD_LIBRARY_PATH</code> command I am not able to get the <code>LD_LIBRARY_PATH</code> value. How to set this value to the <code>current shell</code>.</p>
  
  <p>I found that we have to <code>source</code> it in the current shell. But I want it done by a shell script.</p>
  
  <p>When I am using <code>source exportpath.sh</code> in current shell, then my <code>LD_LIBRARY_PATH</code> is working but I want this should be done by a shell script.</p>
  
  <p>How can I do this?</p>