Title: Run multiple script in ubuntu server
Tags: python;bash;shell
Question: i have 7 ```py``` files which has to run continuously. These ```py``` scripts are in different locations. I am running these files like ```watch -n 2 ./myscript.py```. Is there a way where i can create one bash file or something similar which runs all my 7 ```py``` script parallel? So i can start one script

Comment: python script1.py & 
python script2.py & (basically we send it to background)


Here is another answer: ```#!/bin/bash
    
for folder_name in Fol1 Fol2 F3 F4 floderX
do
cd $folder_name

# run any command in the folder
        
    cd ..  #back to main folder
    
done
```


Here is another answer: I would have just put a comment to Aditya answer if I had enough reputation but if you want to run in parallel and still use watch, you can also do (assuming you have a shebang in your scripts giving the right python interpreter):
```watch 'pathto/script1.py &amp; pathto/script2.py &amp; pathto/script3.py &amp;'
```
(maybe you can also think of adding those scripts to your $PYTHONPATH to avoid giving the path to the scripts)


Here is another answer: The simplest solution to run multiple Python files in // is to tell each process to go into the background with the &amp; shell operator.
```    python script1.py &amp;
    python script2.py &amp;
    python script3.py &amp;
    .......
```


{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 3, 'CommentCount': 1, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2020:00:06/30/20', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<python><bash><shell>', 'Title': 'Run multiple script in ubuntu server', 'ViewCount': 304, 'id': 62653797, 'user_AboutMe': '', 'user_AccountId': 5450071.0, 'user_DisplayName': 'm1711', 'user_Reputation': 101.0, 'user_Views': 21.0, 'user_id': 4335192.0}}