I tried
#!/bin/bash
osascript -e '
tell application "Terminal"
do script "cd ~/www/service/code&& npm install && npm run dev"
activate
end tell
tell application "Terminal"
do script "cd ~/www/app-ui && npm install && npm start"
activate
end tell
'
Nothing happened, no error either. Where went wrong?
tell application "Terminal"block when you can have bothdo scriptcommands in the sametell application "Terminal"block, or gang the command together in the samedo scriptcommand, e.g.do script "command; command"echo foo&&echo bar-- you'll see both commands run.