In this script, a child process PMEMD will by executed.
>br>Also, PMEMD will generate an output file which updates every couple seconds. What the script needs to do is (1)check the output file right after each update and (2)decide whether to kill the child process or not based on some data in the output.
I know how to open a file and read it and analyze the output but how does the script know when the output file gets updated? And how to kill the child process when certain criterion is satisfied?