I have a bash script runs a command in an infinite while loop. The script looks something like:
while : do python3 my_program.py done
Is there a simple way to terminate this while loop from the terminal in a way that doesn't interrupt the python process? ie the python process will finish, then the loop terminates.
Stated another way, perhaps: Is there a while loop whose termination condition is some terminal input?