Considering the situation, there are three files: run.sh, test1.py, test2.py
python3 test1.py
test1.py
import time
if __name__ == '__main__':
print("the first hello from test1.py")
time.sleep(20)
print("the second hello from test1.py")
test2.py
import time
if __name__ == '__main__':
print("hello from test2.py")
if I type this bash run.sh in the command line and execute it. When the file is executed time.sleep () command, I changed it run.sh file and add a line python test2.py.
In this situation, how the bash interpreter work? My test shows that the console will output three lines, could you please tell me the principle?