1

i don't much of max unix command.

What I want to do is open two different terminals and run npm in each one of them.

echo "Starting typescript build in new terminal.."

osascript -e  'npm run build'

sleep 3

echo "Starting firebase functions...."

osascript -e 'firebase emulators:start --only functions'

echo "Process compelete.. Check if there were two terminals window open"

This is what i wrote and this is what I am getting in terminal

Starting typescript build in new terminal..
8:13: syntax error: Expected “given”, “with”, “without”, other parameter name, etc. but found identifier. (-2741)
Starting firebase functions....
0:18: syntax error: A identifier can’t go after this identifier. (-2740)
Process compelete.. Check if there were two terminals window open

Can somone help me out in correcting my shell script

1 Answer 1

1

Like this:

osascript -e 'tell application "Terminal" to do script "cd && npm run build"' &
osascript -e 'tell application "Terminal" to do script "cd && firebase emulators:start --only functions"' &
Sign up to request clarification or add additional context in comments.

1 Comment

Can you please answer a relative question to this as well? stackoverflow.com/questions/62658602/…

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.