title: How to pass variables of one user to another user in Linux?
body: <p>I have a user <code>myuser</code> and an environment variable <code>test</code></p>
  <p><strong>export var=test</strong></p>
  <p>Saved bashprofile and works fine.</p>
  <p>When running a shell script, I like to pass above variable and echo it with different user like below.</p>
  <p><strong>sudo su - anotheruser -c 'echo ${var}'</strong></p>
  <p>I tried this and it did not work. How do I pass the variable in the shell script ?</p>
  <p>Thanks in advance.</p>