title: Run a another within script
body: <p>I have to run another terminal within script and wait for function to execute on that terminal
  before proceeding next command in shell script. Scenario is as like below</p>
  
  <p>script.sh</p>
  
  <pre><code>!/bin/sh
  
  ...
  ...
  gnome-terminal --working-directory=#{image_path} -e ./test.sh # execute test.sh script on  another terminal
  
  ./switch 0 0 # I have to execute this command after test.sh script gets completed on another terminal
  
  ...
  ...
  </code></pre>
  
  <p>Here problem is. test.sh script is not gets executed fully and returned back immediately to parent script and executes <code>./switch 0 0</code> command. As this <code>./switch 0 0</code> command depends on <code>test.sh</code> script completion, my script gets failed.</p>
  
  <p>Regards
  Manish B.</p>