I wrote a shell script, A, in which it calls another script, B. What B does is to run some calculation and create a text file.
I don't own the code of B, and A has to call it in the foreground for non-tech reasons.
it takes less than 1 minute for B to calculate and create the text, however, B won't end itself and return the control to A until 6 minutes later.
Now the user complained why it takes 7 minutes to run script A.
Therefore my question is how can I rewrite A to detect the file is created and thus terminate B immediately to regain the control? if A still has to run B in foreground? is it doable?
hope I've made myself clear.
thanks! John