title: Sharing variables between two independent shell scripts
body: <p>I am trying to export a variable from one script and use it in another script but this variable is not being exported what might be the problem</p>
  
  <p>Consider this as script1</p>
  
  <pre><code>#!/bin/sh
  export x=19
  exit 0
  </code></pre>
  
  <p>Consider this as script2</p>
  
  <pre><code>#!/bin/sh
  echo "x="${x}
  exit 0
  </code></pre>
  
  <p>i am executing them as two independent scripts like</p>
  
  <pre><code>desktop:~/Desktop/Trail_Programs$ sh script1.sh
  desktop:~/Desktop/Trail_Programs$ sh script2.sh
  </code></pre>
  
  <p>and output is </p>
  
  <pre><code>desktop:~/Desktop/Trail_Programs$ sh script2.sh 
  x=
  </code></pre>