title: Making environment variable exported from shell script to cron job
body: <p>We are trying to make environment variable available to a cron job and request some help with this.</p>
  <p>Please find below what we have done:</p>
  <ol>
  <li>We created a shell script &quot;script_a.sh&quot; that accepts a value from the root user in an interactive shell.  Once accepted, it would export that accepted value under &quot;userValue&quot; environment variable.</li>
  <li>We have another script called &quot;script_b.sh&quot; invoked by cron job.  We would like &quot;userValue&quot; environment variable available to &quot;script_b.sh&quot;.</li>
  </ol>
  <p>However, the &quot;userValue&quot; is not available to &quot;script_b.sh&quot;.</p>
  <p>At present, as a temporary alternative we are exporting &quot;userValue&quot; environment variable to ~/.bashrc to make it available to &quot;script_b.sh&quot;.  However, we don't want to store &quot;userValue&quot; environment variable in plain text in ~/.bashrc due to security reasons.</p>
  <p>Can you please help any alternative around it?</p>