I have 5 python servers in different Directories. I want to write a bash/python script that can open 5 terminal tabs to run each server parallelly. As I also want to monitor the output of the server on the terminal I don't want them to run in the background.
#!/bin/bash
cd /home/user/dir_1
source venv/bin/activate
python manage.py runserver 8009
gnome-terminal --tab
cd /home/user/dir_2
source venv/bin/activate
python manage.py runserver 8001
This was my initial thought. But as these are servers, until one command is completed it will not go to another one so it cant achieve the desired result. As i don't have much experience with this kinda stuff please explain in a noobs langauage.