title: applescript and terminal ( run several do shell script in one terminal window )
body: <p>I do have several shell scripts whom are get activate not really behind each other.</p>
  
  <p>But I want to stay in the same terminal window.</p>
  
  <p>To simplify the problem, lets say that as example</p>
  
  <p>first script. - cd to the working directory
  second.       - do some things and get files from that directory
  third.        - dome more thing on the newly files/folders in that directory.
  fourth.       - ....</p>
  
  <p>How can I let script 2 and 3 ( all the script thus ) run in that very same directory and window that is opened during script 1?</p>
  
  <p>F.e how can I avoid using the full path to that folder for every file.</p>
  
  <p>EDIT: After adayzdone's answer I realize that I forgot to mention that I need also administrator privileges for one of the scripts</p>
  
  <p>EDIT2: For now I use this</p>
  
  <pre><code>tell application "Terminal"
      set newTab to do script
      set current settings of newTab to settings set "Grass"
      do script "bin/sh/ echo 'xx' | su;" in newTab
      do script "cd " &amp; quoted form of realParentPath in newTab
      do script shellscript1 in newTab
      do script shellscript..n in newTab
      activate
  end tell
  </code></pre>
  
  <p>but still no dice with the privileges.</p>