Last active
          August 14, 2021 20:04 
        
      - 
      
 - 
        
Save leo-pfeiffer/37454eecf26f9657be92959124f22590 to your computer and use it in GitHub Desktop.  
    Shell script for starting multiple processes
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/bash | |
| # first process | |
| cd ~/Desktop/folder1 | |
| # start your first process with nohup | |
| # (the `&` is important) | |
| nohup python proc1.py > proc1.out 2>&1 & | |
| echo "proc2.py PID:" $! | |
| # same for the second process | |
| cd ~/Desktop/folder2 | |
| nohup python proc2.py > proc2.out 2>&1 & | |
| echo "proc2.py PID:" $! | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment