2

I am trying to create a bash .sh script file that uses osascript to open 1 new terminal window/tab and then runs 2 commands "cd fs" and than "gulp" (both in the same window/tab)

This is what I am trying and it runs the second command (do script "gulp") in another (third) window/tab, not the second one that was opened.

osascript -e ' tell application "Terminal" do script "cd fs" do script "gulp" end tell'

1 Answer 1

4

I was able to find the answer I was looking for

osascript -e " tell application \"Terminal\" set currentTab to do script \"cd $(pwd)\" delay 2 do script \"gulp env --env int\" in currentTab delay 5 do script \"gulp\" in currentTab delay 30 end tell"

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.