Running multiple shell instances with different parameters at the same time

1

Assume I have a python script that I want to run with different parameter combinations (I have MacBook Pro). If I use a shell script to do so (say run.sh), does it make sense to run run.sh multiple times at the same time, each of which in different parameter combinations? In order word, do different parameter combinations touch each other while both are running in the memory? Is this something like the concept of memory protection?

Katherine

Posted 2018-02-17T23:28:12.197

Reputation: 13

Answers

1

You can certainly run multiple instances of the same python script (and the shell script too) -- each runs as a separate process, with its own memory, variables, etc.

But there is a caveat to this: if they work with the same files, you can get conflicts there. If they try to output to the same file, you may have one overwriting others, or something similar. If they're all trying to modify a file, things can get even messier.

Gordon Davisson

Posted 2018-02-17T23:28:12.197

Reputation: 28 538