Run a another within script

view full story

http://stackoverflow.com – 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 script.sh !/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 ... ... Here problem is. test.sh script is not gets executed fully and returned back immediately to parent script and executes ./switch 0 0 command. As this ./switch 0 0 command depends o (HowTos)