Query on a shell script logic
Hello people,
I am new to shell scripting and hoping to get a quick answer to my query.
I am writing a simple script which needs to call an executale which generates an output file. Once the output file is generated I have to do a couple of more task with that file. The executable ideally takes 2 to 3 minutes to finish execution.
My question is
- Should I call the executable & once done look for the output file to do the next steps.
Or
- Should I run the executable as a backgound process using "&" and then have a loop which will keep checking whether the output file is generated.
Is there any drawbacks with following either of these approaches.
Any inputs would be highly appreciated.
Regards,
Tipsy
|