title: temporarily add commands in shell script
body: <p>I am working on a shell script that is calling a python program (several times) which itself is calling an other program with the following line:</p>
  
  <pre><code>Popen("aprogram argument")
  </code></pre>
  
  <p><code>aprogram</code> is a program that is not available on my computer and if available does trigger a mainframe process that can take some time. therefore i want a mock up. </p>
  
  <p>Is it possible to create an alias that links to <code>amockupscript.sh</code> that is only accessible from inside my script and programs started from my script, but will not stay inside the system and or screw up existing installations of <code>aprogram</code></p>
  
  <p>In the end the program flow should be something like that:</p>
  
  <p>I run my script. The script does some magic. The script calls <code>python myPythonProgram.py</code>. <code>myPythonProgram</code>calls <code>Popen("aprogram")</code>. Behind the curtain actually <code>mymockupscript.sh</code> is executed. After my script is finished everything is back to normal, and a regular execution of <code>myPythonProgram</code> results in its <code>Popen("aprogram")</code> calls to actually attempt to open <code>aprogram</code></p>