Sample Header Ad - 728x90

Trying to execute shell commands opening multiple terminals

1 vote
1 answer
235 views
I have a shell command which I use to setup multiple servers (metro, laravel, ngrok). Each of these processes needs to be executed in its own Terminal window. The issue right now is that all I'm able to do is start the laravel server and the command hangs there... Is it possible to execute each line of the command in their corresponding Terminal window?
#!/bin/bash
cd /Users/gabriel/Desktop/proyectos/laravelapp.com && php artisan serve
cd /Users/gabriel/Desktop/proyectos/laravelapp.com && php artisan db:drop && php artisan db:create && php artisan migrate --seed
ngrok http 8000
cd /Users/gabriel/Desktop/proyectos/woo/android && gradlew clean && cd .. && npx react-native run-android -- --reset-cache
cd /Users/gabriel/Desktop/proyectos/laravelapp.com && php artisan websockets:serve
Asked by gabogabans (119 rep)
Jun 19, 2023, 01:05 PM
Last activity: Nov 11, 2024, 05:04 AM